Re: [PERFORM] Why we don't want hints Was: Slow count(*) again...

2011-02-22 Thread Robert Haas
On Wed, Feb 16, 2011 at 4:22 PM, Bruce Momjian br...@momjian.us wrote: I am not excited about the idea of putting these correlations in queries.  What would be more intesting would be for analyze to build a correlation coeffficent matrix showing how columns are correlated:        a   b   c  

Re: [PERFORM] Query performance with disabled hashjoin and mergejoin

2011-02-22 Thread Robert Haas
On Fri, Feb 4, 2011 at 7:08 AM, Ivan Voras ivo...@freebsd.org wrote:                                 -  BitmapAnd  (cost=1282.94..1282.94 rows=1430 width=0) (actual time=5.508..5.508 rows=0 loops=1)                                       -  Bitmap Index Scan on news_index_layout_id_state  

Re: [PERFORM] Exhaustive list of what takes what locks

2011-02-22 Thread Robert Haas
On Wed, Feb 2, 2011 at 12:20 AM, Noah Misch n...@leadboat.com wrote: CREATE TABLE account (account_id SERIAL PRIMARY KEY, name CHARACTER VARYING NOT NULL); CREATE TABLE foo (account_id INTEGER NOT NULL REFERENCES account (account_id), stuff CHARACTER VARYING); DROP TABLE foo; That query

Re: [PERFORM] Exhaustive list of what takes what locks

2011-02-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: The problem is that constraints can affect the query plan. If a transaction sees the constraint in the system catalogs (under SnapshotNow) but the table data doesn't conform (under some earlier snapshot) and if the chosen plan depends on the validity

Re: [PERFORM] Exhaustive list of what takes what locks

2011-02-22 Thread Noah Misch
On Tue, Feb 22, 2011 at 10:18:36PM -0500, Robert Haas wrote: On Wed, Feb 2, 2011 at 12:20 AM, Noah Misch n...@leadboat.com wrote: CREATE TABLE account (account_id SERIAL PRIMARY KEY, name CHARACTER VARYING NOT NULL); CREATE TABLE foo (account_id INTEGER NOT NULL REFERENCES account