Re: Noobie: Problems with a query

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Chris Boget <chris(at)wild(dot)net>
Cc: Nabil Sayegh <postgresql(at)e-trolley(dot)de>, PGSql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Noobie: Problems with a query
Date: 2003-06-30 13:54:11
Message-ID: 20030630135411.GA26591@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Jun 30, 2003 at 08:42:07 -0500,
Chris Boget <chris(at)wild(dot)net> wrote:
>
> so 'EXPLAIN ANALYZE your_query' gives more information that just EXPLAIN?

Yes. It sort of runs the query so that you find out how long it actually
takes to run as well as seeing the actual number of rows handled in some
steps. This helps tell why a plan didn't work very well.

> In any case, I did 'vacuum' and 'vacuum analyze' there but neither seemed to
> improve matters. However, this morning, after I did 'vacuum analyze' from
> the PG command prompt, I re-ran the query and the rows came back in
> milliseconds. I'll have to see if the rows come back that quickly in pgAdmin
> and, if it does, that tells me there is something wrong with the way pgAdmin
> does the 'vacuum' and 'vacuum analyze'. If the rows don't come back that
> fast, then it'll tell me that there is *alot* of overhead when using pgAdmin to
> run queries.

It seems odd that vacuum analyze didn't work form pgadmin. Perhaps it
wasn't run against all of the tables or you ran it before loading the
tables.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2003-06-30 14:01:04 Re: Vacuum and Vacuum analyze
Previous Message Chris Boget 2003-06-30 13:49:28 Vacuum and Vacuum analyze