mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 10:11:29 +08:00
Add COSTS OFF to make test more stable
For some reason the cost estimates are different on my machine.
This commit is contained in:
parent
8a5e59b097
commit
b259191dfe
@ -4878,31 +4878,31 @@ WARNING: column type "timestamp without time zone" used for "time" does not fol
|
||||
--
|
||||
-- Expect batch size to be lower than defined max_insert_batch_size
|
||||
--
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..0.01 rows=1 width=506)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 910
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Result
|
||||
(7 rows)
|
||||
|
||||
INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
EXPLAIN INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..37.50 rows=1499 width=506)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 910
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Subquery Scan on "*SELECT*" (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> ProjectSet (cost=0.00..7.52 rows=1499 width=12)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=0)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Subquery Scan on "*SELECT*"
|
||||
-> ProjectSet
|
||||
-> Result
|
||||
(9 rows)
|
||||
|
||||
INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
@ -4932,16 +4932,16 @@ WARNING: column type "timestamp without time zone" used for "time" does not fol
|
||||
(23,public,test_1702,t)
|
||||
(1 row)
|
||||
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..0.01 rows=1 width=242)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 1000
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Result
|
||||
(7 rows)
|
||||
|
||||
DROP TABLE test_1702;
|
||||
|
@ -4877,31 +4877,31 @@ WARNING: column type "timestamp without time zone" used for "time" does not fol
|
||||
--
|
||||
-- Expect batch size to be lower than defined max_insert_batch_size
|
||||
--
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..0.01 rows=1 width=506)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 910
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Result
|
||||
(7 rows)
|
||||
|
||||
INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
EXPLAIN INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..37.50 rows=1499 width=506)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 910
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Subquery Scan on "*SELECT*" (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> ProjectSet (cost=0.00..7.52 rows=1499 width=12)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=0)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Subquery Scan on "*SELECT*"
|
||||
-> ProjectSet
|
||||
-> Result
|
||||
(9 rows)
|
||||
|
||||
INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
@ -4931,16 +4931,16 @@ WARNING: column type "timestamp without time zone" used for "time" does not fol
|
||||
(23,public,test_1702,t)
|
||||
(1 row)
|
||||
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..0.01 rows=1 width=242)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 1000
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Result
|
||||
(7 rows)
|
||||
|
||||
DROP TABLE test_1702;
|
||||
|
@ -4884,31 +4884,31 @@ WARNING: column type "timestamp without time zone" used for "time" does not fol
|
||||
--
|
||||
-- Expect batch size to be lower than defined max_insert_batch_size
|
||||
--
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..0.01 rows=1 width=506)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 910
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=506)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Result
|
||||
(7 rows)
|
||||
|
||||
INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
EXPLAIN INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..37.50 rows=1499 width=506)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 910
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> Subquery Scan on "*SELECT*" (cost=0.00..37.50 rows=1499 width=506)
|
||||
-> ProjectSet (cost=0.00..7.52 rows=1499 width=12)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=0)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Subquery Scan on "*SELECT*"
|
||||
-> ProjectSet
|
||||
-> Result
|
||||
(9 rows)
|
||||
|
||||
INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
@ -4938,16 +4938,16 @@ WARNING: column type "timestamp without time zone" used for "time" does not fol
|
||||
(23,public,test_1702,t)
|
||||
(1 row)
|
||||
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------------------
|
||||
Custom Scan (HypertableModify) (cost=0.00..0.01 rows=1 width=242)
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
QUERY PLAN
|
||||
-----------------------------------------------
|
||||
Custom Scan (HypertableModify)
|
||||
Insert on distributed hypertable test_1702
|
||||
-> Insert on test_1702 (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Custom Scan (DataNodeDispatch) (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Insert on test_1702
|
||||
-> Custom Scan (DataNodeDispatch)
|
||||
Batch size: 1000
|
||||
-> Custom Scan (ChunkDispatch) (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Result (cost=0.00..0.01 rows=1 width=242)
|
||||
-> Custom Scan (ChunkDispatch)
|
||||
-> Result
|
||||
(7 rows)
|
||||
|
||||
DROP TABLE test_1702;
|
||||
|
@ -1522,10 +1522,10 @@ SELECT create_distributed_hypertable('test_1702', 'time', 'id');
|
||||
--
|
||||
-- Expect batch size to be lower than defined max_insert_batch_size
|
||||
--
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
|
||||
EXPLAIN INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
INSERT INTO test_1702(id, time) SELECT generate_series(2, 1500), current_timestamp;
|
||||
SELECT count(*) from test_1702;
|
||||
|
||||
@ -1545,7 +1545,7 @@ CREATE TABLE test_1702 (
|
||||
|
||||
SELECT create_distributed_hypertable('test_1702', 'time', 'id');
|
||||
|
||||
EXPLAIN INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
EXPLAIN (COSTS OFF) INSERT INTO test_1702(id, time) VALUES('1', current_timestamp);
|
||||
|
||||
DROP TABLE test_1702;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user