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 12:37:25
Message-ID: 20030630123725.GA26142@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Jun 30, 2003 at 07:27:30 -0500,
Chris Boget <chris(at)wild(dot)net> wrote:
> > Am Mon, 2003-06-30 um 13.56 schrieb Chris Boget:
> > > which, sadly, is greek to me. The problem is that the above query
> > > takes very close to 12 seconds to execute. Is there a better way I
> > > could write the query? The number of rows in each table are as
> > > follows:
> > First of all you should try: VACUUM ANALYZE;
>
> What was that supposed to tell me?

It was supposed to make sure that the planner had reliable data from
which to plan your query.

When sending a query plan to the lists, you want to do an explain analyze
so that we can see what really happens when your query is executed as
well as what the planner thinks is going to happen.

The plan for your query had a fairly small number of rows for it to take
12 seconds to run the query. This is one hint that an analyze might not
have been done.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message cristi 2003-06-30 13:36:30 blobs
Previous Message Nabil Sayegh 2003-06-30 12:35:16 Re: Noobie: Problems with a query