Re: Surprise :-(

From: "Steve Wolfe" <nw(at)codon(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Surprise :-(
Date: 2002-09-06 18:30:29
Message-ID: 001801c255d3$7aecb9b0$d281f6cc@WEASEL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I've ran into similar oddnesses twice in the past two months. In both
cases, a developper came to me and said that a particular query ran very
quickly the day the table was created and populated, and ran very slowly
starting the next day, after the DB had been VACUUM'ed. In both cases,
their WHERE clause used operations such as concatenations on fields that
did not have indexes. In both cases, creating the indexes speeded up the
query, dropping the cost from some obscene number to a very low one. ( on
the order of 8000 to 60).

I'm not sure why the queries worked well before the database was
VACUUM'ed, but it's happened to me twice now - and it sounds similar
enough to your situation that you may want to look at whether you have
appropriate indexes created on your table.

steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel Rodrigues 2002-09-06 18:35:36 Re: "...integer[] references..." = error
Previous Message Nigel J. Andrews 2002-09-06 18:27:12 Re: Surprise :-(