Re: [GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-03 Thread Steve Crawford
On 02/03/2011 07:29 AM, Bill Thoen wrote: Got it solved! Great. The problem was one of two things,or maybe both. I had somehow gotten over 15 million records into the master table and even though I "deleted" them and run VACUUM ANALYZE over the table, they were still taking up space in the t

Re: [GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-03 Thread Bill Thoen
Got it solved! The problem was one of two things,or maybe both. I had somehow gotten over 15 million records into the master table and even though I "deleted" them and run VACUUM ANALYZE over the table, they were still taking up space in the table. Perhaps even just opening a table with that

Re: [GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-02 Thread Steve Crawford
On 02/02/2011 01:35 PM, Bill Thoen wrote: Steve Crawford wrote: On 02/02/2011 12:17 PM, Bill Thoen wrote: I've got a large (and growing) database set up as a partitioned database What is the setting of contstraint_exclusion? http://www.postgresql.org/docs/9.0/static/runtime-config-query.h

Re: [GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-02 Thread Steve Crawford
On 02/02/2011 12:17 PM, Bill Thoen wrote: I've got a large (and growing) database set up as a partitioned database What is the setting of contstraint_exclusion? http://www.postgresql.org/docs/9.0/static/runtime-config-query.html#GUC-CONSTRAINT-EXCLUSION Cheers, Steve

[GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-02 Thread Bill Thoen
I've got a large (and growing) database set up as a partitioned database. The partitions are physically broken out by state plus a unique id for each. There's roughly 20 million records in the whole thing just now. My question is, why does a simple query supplying both parts of the index key w