Re: calculating time

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>, "pg-general (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: calculating time
Date: 2003-04-16 16:50:29
Message-ID: 20030416165029.GB9649@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 16, 2003 at 08:26:27 -0400,
Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> wrote:
> On Wed, Apr 16, 2003 at 08:19:28AM -0400, Johnson, Shaunn wrote:
>
> > Nested Loop (cost=0.00..5662254656.82 rows=138 width=199)
> >
> > The cost is supposed to be the amount of time it may take to
> > do a query, right? So what, exactly, is this? 500 hours?
> > minutes? CPU time?
>
> It's an arbitrary unit that can't be reliably converted into some
> real-world time. You can try using EXPLAIN ANALYZE, which will execute
> the query and give you timed costs. With that data you can also
> probably check that the estimates given by the planner are within some
> reasonable range.

But I wouldn't try it with the sample query since that won't finish in
a reasonable amount of time.

Just to get a rough idea of the scale factor, on my machine the estimated
cost is close to the execution time in milliseconds.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Medi Montaseri 2003-04-16 17:04:05 Re: Postgres Compare
Previous Message Tom Lane 2003-04-16 16:26:58 Re: [HACKERS] Are we losing momentum?