[GENERAL] Partitioning with the index on the master table.

2015-03-04 Thread Semyon Reyfman
I have a list-based partition table and I want to prevent scanning of all children tables in a JOIN, which is using the partition column. I know that CHECK constraints are not used in this case so I hope that creating an index on the partition column would help. But I am not sure if I should cre

Re: [GENERAL] ANALYZE after CREATE TABLE AS SELECT...

2015-02-26 Thread Semyon Reyfman
This is exactly my situation. Thanks. Semyon Reyfman -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David Steele Sent: Thursday, February 26, 2015 8:19 PM To: Tom Lane; Semyon Reyfman Cc: pgsql-general@postgresql.org

[GENERAL] ANALYZE after CREATE TABLE AS SELECT...

2015-02-26 Thread Semyon Reyfman
Hi, When I create a table with "CREATE TABLE name AS SELECT." statement and immediately afterward use this new table in a query does it make sense to run ANALYZE on the table in between? It appears that postgres should be able to collect very detailed statistics while emitting the table but I

[GENERAL] ANALYZE after CREATE TABLE AS SELECT...

2015-02-26 Thread Semyon Reyfman
Hi, When I create a table with "CREATE TABLE name AS SELECT." statement and immediately afterward use this new table in a query does it make sense to run ANALYZE on the new table in between? It appears that postgres should be able to collect very detailed statistics while emitting the table bu