123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- # Copyright Materialize, Inc. and contributors. All rights reserved.
- #
- # Use of this software is governed by the Business Source License
- # included in the LICENSE file at the root of this repository.
- #
- # As of the Change Date specified in that file, in accordance with
- # the Business Source License, use of this software will be governed
- # by the Apache License, Version 2.0.
- statement ok
- CREATE TABLE t (f0 int, f1 int, f2 int)
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT DISTINCT * FROM t GROUP BY f1, f2, f0
- ----
- Explained Query:
- Distinct project=[#0{f0}..=#2{f2}] // { arity: 3 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT DISTINCT r0 FROM (SELECT DISTINCT f1 + 1 as r0, f0 FROM t)
- ----
- Explained Query:
- Distinct project=[(#0{f1} + 1)] // { arity: 1 }
- Project (#1{f1}) // { arity: 1 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT DISTINCT f1 FROM (SELECT DISTINCT f0, f1 FROM t)
- ----
- Explained Query:
- Distinct project=[#0{f1}] // { arity: 1 }
- Project (#1{f1}) // { arity: 1 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT DISTINCT FROM (SELECT DISTINCT f0, f1 FROM t)
- ----
- Explained Query:
- Distinct project=[] // { arity: 0 }
- Project () // { arity: 0 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT DISTINCT FROM (SELECT DISTINCT f0 FROM (SELECT DISTINCT f0, f1 FROM t));
- ----
- Explained Query:
- Distinct project=[] // { arity: 0 }
- Project () // { arity: 0 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT f0 FROM (SELECT f0 FROM t GROUP BY f1 / 10, f0) GROUP BY f0;
- ----
- Explained Query:
- Distinct project=[#0{f0}] // { arity: 1 }
- Project (#0{f0}) // { arity: 1 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
- query T multiline
- EXPLAIN OPTIMIZED PLAN WITH(humanized expressions, arity, join implementations) AS VERBOSE TEXT FOR SELECT f0 / 20 FROM (SELECT f0 / 10 AS f0 FROM t GROUP BY f0 / 10) GROUP BY f0 / 20;
- ----
- Explained Query:
- Distinct project=[((#0{f0} / 10) / 20)] // { arity: 1 }
- Project (#0{f0}) // { arity: 1 }
- ReadStorage materialize.public.t // { arity: 3 }
- Source materialize.public.t
- Target cluster: quickstart
- EOF
|