Re: Help trying to tune query that executes 40x slower than in SqlServer

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Hugo Ferreira <bytter(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Help trying to tune query that executes 40x slower than in SqlServer
Date: 2005-03-09 22:08:32
Message-ID: 200503100908.32467.mr-russ@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 9 Mar 2005 11:08 pm, Hugo Ferreira wrote:
> For example... I run the query, it takes 122seconds. Then I delete the
> target tables, vacuum the database, re-run it again: 9s. But if I run
> vacuum several times, and then run, it takes again 122seconds. If I
> stop this 122seconds query, say, at second 3 and then run it again, it
> will only take 9s. It simply doesn't make sense. Also, explain analyse
> will give me diferent plans each time I run it... Unfortunately, this
> is rendering PostgreSQL unusable for our goals. Any ideas?
>
The explain analyze is still be best information if you want assistance with
what postgresql is doing, and how to stop it. If you could attach
explain analyzes for both the fast (9s), and slow (122s) runs, that would
help people get an idea of how the query is running. At the moment
we don't know how postgresql is actually executing the query.

Regards

Russell Smith.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David Brown 2005-03-10 00:06:23 Re: index scan on =, but not < ?
Previous Message Oleg Bartunov 2005-03-09 20:27:33 Re: How to speed up tsearch2 indexing