Re: [PERFORM] Planner do seq scan on empty master partitioned table

2016-08-11 Thread Tom Lane
Andrey Zhidenkov writes: > I have a table (registry.entry) which has ~ 100 inherited tables. This > is a master table and it's empty: As long as it's empty, a seqscan should be essentially free. Don't worry about it. And definitely don't create indexes, that will just add cost.

Re: [PERFORM] Planner do seq scan on empty master partitioned table

2016-08-11 Thread Vladimir Borodin
> 11 авг. 2016 г., в 13:46, Andrey Zhidenkov > написал(а): > > I have a table (registry.entry) which has ~ 100 inherited tables. This > is a master table and it's empty: > > postgres@db=# select count(*) from only registry.entry; > count > --- > 0 > (1 row) > > Master table has rules,

[PERFORM] Planner do seq scan on empty master partitioned table

2016-08-11 Thread Andrey Zhidenkov
I have a table (registry.entry) which has ~ 100 inherited tables. This is a master table and it's empty: postgres@db=# select count(*) from only registry.entry; count --- 0 (1 row) Master table has rules, inherited tables has check constraints. Data partitioned by value of area_id. But