-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
Description
postgres=# create table test(id int primary key, info text, crt_time timestamp);
CREATE TABLE
postgres=# select create_range_partitions('test'::regclass, 'id', 1, 20000000, 100, false);
create_range_partitions
-------------------------
100
(1 row)
postgres=# select disable_parent('test'::regclass);
disable_parent
----------------
(1 row)
postgres=# explain select * from test where id=1;
QUERY PLAN
---------------------------------------------------------------------------------
Append (cost=0.00..2.17 rows=2 width=44)
-> Seq Scan on test (cost=0.00..0.00 rows=1 width=44)
Filter: (id = 1)
-> Index Scan using test_1_pkey on test_1 (cost=0.15..2.17 rows=1 width=44)
Index Cond: (id = 1)
(5 rows)
when i reconnect
postgres=# \q
-> psql
psql (9.6rc1)
Type "help" for help.
postgres=# explain select * from test where id=1;
QUERY PLAN
---------------------------------------------------------------------------------
Append (cost=0.15..2.17 rows=1 width=44)
-> Index Scan using test_1_pkey on test_1 (cost=0.15..2.17 rows=1 width=44)
Index Cond: (id = 1)
(3 rows)