patrick ~ <[EMAIL PROTECTED]> writes:

> I noticed that a freshly created db with freshly inserted data (from
> a previous pg_dump) would result in quite fast results.  However,
> after running 'vacuum analyze' the very same query slowed down about
> 1250x (Time: 1080688.921 ms vs Time: 864.522 ms).

If it gets slower immediately after a single vacuum analyze then the problem
is that one of the queries is getting planned wrong when stats are available.
If it takes a while to slow down then it could be other problems such as index
bloat etc.

Don't use "explain verbose" use "explain analyze". I don't know if it was in
7.1 but you say you reproduced the problem with 7.4. It would be helpful to
see the results of "explain analyze select ..." on the query before and after
the vacuum analyze.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to