mirror of https://github.com/citusdata/citus.git
intermediate_results: COSTS OFF
parent
b2ea806d8a
commit
667c67891e
|
@ -208,10 +208,10 @@ SELECT create_intermediate_result('squares', 'SELECT s, s*s FROM generate_series
|
||||||
632
|
632
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
EXPLAIN SELECT * FROM read_intermediate_result('squares', 'binary') AS res (x int, x2 int);
|
EXPLAIN (COSTS OFF) SELECT * FROM read_intermediate_result('squares', 'binary') AS res (x int, x2 int);
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
-----------------------------------------------------------------------------------
|
-----------------------------------------------
|
||||||
Function Scan on read_intermediate_result res (cost=0.00..4.55 rows=632 width=8)
|
Function Scan on read_intermediate_result res
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- less accurate results for variable types
|
-- less accurate results for variable types
|
||||||
|
@ -221,10 +221,10 @@ SELECT create_intermediate_result('hellos', $$SELECT s, 'hello-'||s FROM generat
|
||||||
63
|
63
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
EXPLAIN SELECT * FROM read_intermediate_result('hellos', 'binary') AS res (x int, y text);
|
EXPLAIN (COSTS OFF) SELECT * FROM read_intermediate_result('hellos', 'binary') AS res (x int, y text);
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
-----------------------------------------------------------------------------------
|
-----------------------------------------------
|
||||||
Function Scan on read_intermediate_result res (cost=0.00..0.32 rows=30 width=36)
|
Function Scan on read_intermediate_result res
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- not very accurate results for text encoding
|
-- not very accurate results for text encoding
|
||||||
|
@ -234,10 +234,10 @@ SELECT create_intermediate_result('stored_squares', 'SELECT square FROM stored_s
|
||||||
4
|
4
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
EXPLAIN SELECT * FROM read_intermediate_result('stored_squares', 'text') AS res (s intermediate_results.square_type);
|
EXPLAIN (COSTS OFF) SELECT * FROM read_intermediate_result('stored_squares', 'text') AS res (s intermediate_results.square_type);
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
----------------------------------------------------------------------------------
|
-----------------------------------------------
|
||||||
Function Scan on read_intermediate_result res (cost=0.00..0.01 rows=1 width=32)
|
Function Scan on read_intermediate_result res
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
END;
|
END;
|
||||||
|
|
|
@ -122,15 +122,15 @@ END;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
-- accurate row count estimates for primitive types
|
-- accurate row count estimates for primitive types
|
||||||
SELECT create_intermediate_result('squares', 'SELECT s, s*s FROM generate_series(1,632) s');
|
SELECT create_intermediate_result('squares', 'SELECT s, s*s FROM generate_series(1,632) s');
|
||||||
EXPLAIN SELECT * FROM read_intermediate_result('squares', 'binary') AS res (x int, x2 int);
|
EXPLAIN (COSTS OFF) SELECT * FROM read_intermediate_result('squares', 'binary') AS res (x int, x2 int);
|
||||||
|
|
||||||
-- less accurate results for variable types
|
-- less accurate results for variable types
|
||||||
SELECT create_intermediate_result('hellos', $$SELECT s, 'hello-'||s FROM generate_series(1,63) s$$);
|
SELECT create_intermediate_result('hellos', $$SELECT s, 'hello-'||s FROM generate_series(1,63) s$$);
|
||||||
EXPLAIN SELECT * FROM read_intermediate_result('hellos', 'binary') AS res (x int, y text);
|
EXPLAIN (COSTS OFF) SELECT * FROM read_intermediate_result('hellos', 'binary') AS res (x int, y text);
|
||||||
|
|
||||||
-- not very accurate results for text encoding
|
-- not very accurate results for text encoding
|
||||||
SELECT create_intermediate_result('stored_squares', 'SELECT square FROM stored_squares');
|
SELECT create_intermediate_result('stored_squares', 'SELECT square FROM stored_squares');
|
||||||
EXPLAIN SELECT * FROM read_intermediate_result('stored_squares', 'text') AS res (s intermediate_results.square_type);
|
EXPLAIN (COSTS OFF) SELECT * FROM read_intermediate_result('stored_squares', 'text') AS res (s intermediate_results.square_type);
|
||||||
END;
|
END;
|
||||||
|
|
||||||
-- pipe query output into a result file and create a table to check the result
|
-- pipe query output into a result file and create a table to check the result
|
||||||
|
|
Loading…
Reference in New Issue