Re: [PERFORM] Analyze makes queries slow...

2003-08-14 Thread Tom Lane
Stef <[EMAIL PROTECTED]> writes: > => Could we see the results of "EXPLAIN ANALYZE", rather than just EXPLAIN, > => for the un-analyzed case? > Attached the output of this. Hmm... not immediately obvious where it's going wrong. Could you try this (after ANALYZE): set enable_mergejoin t

Re: [PERFORM] Analyze makes queries slow...

2003-08-14 Thread Jacek Rembisz
On Mon, Aug 11, 2003 at 03:58:41PM +0200, Stef wrote: > I have attached an sql statement that normally runs under 3 minutes. > That is, until I vacuum analyze the database (or just the tables in the query), > then the same query runs longer than 12 hours, and I have to kill it. Hmm, I have notice

Re: [PERFORM] Analyze makes queries slow...

2003-08-14 Thread Tom Lane
Stef <[EMAIL PROTECTED]> writes: > I have attached an sql statement that normally runs under 3 minutes. > That is, until I vacuum analyze the database (or just the tables in the query), > then the same query runs longer than 12 hours, and I have to kill it. Could we see the results of "EXPLAIN ANA

[PERFORM] Analyze makes queries slow...

2003-08-14 Thread Stef
Hi all, I posted this problem on the sql list, and was referred to this list in stead. I have attached an sql statement that normally runs under 3 minutes. That is, until I vacuum analyze the database (or just the tables in the query), then the same query runs longer than 12 hours, and I have to k

Re: [PERFORM] Analyze makes queries slow...

2003-08-14 Thread Tom Lane
Stef <[EMAIL PROTECTED]> writes: > => And what PG version is this, exactly? > PostgreSQL 7.3.1 Ah, I think I see it: you are getting burnt by a mergejoin estimation bug that was fixed in 7.3.2. Please update (you might as well go to 7.3.4 while you're at it) and see if the results improve.

Re: [PERFORM] Analyze makes queries slow...

2003-08-14 Thread Stef
Hi Tom, Thanks for responding. I got as much info as I could : On Mon, 11 Aug 2003 11:43:45 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: => Could we see the results of "EXPLAIN ANALYZE", rather than just EXPLAIN, => for the un-analyzed case? Attached the output of this. => Also, what do you see

Re: [PERFORM] Analyze makes queries slow...

2003-08-14 Thread Stef
On Mon, 11 Aug 2003 14:25:03 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: => set enable_mergejoin to off; => explain analyze ... query ... => => If it finishes in a reasonable amount of time, send the explain output. Hi again, I did this on the 7.3.1 database, and attached the output.