Re: calculating time

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: calculating time
Дата
Msg-id 20030416122627.GC1917@dcc.uchile.cl
обсуждение исходный текст
Ответ на calculating time  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Ответы Re: calculating time  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: calculating time  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
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.

One thing I've wondered is if one can trust the "conversion" to keep
roughly the same from one query to another, i.e. if I determine the
constants to convert estimates to execution time, can I use that in the
future? (same machine, same shared buffers settings, etc)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"XML!" Exclaimed C++.  "What are you doing here? You're not a programming
language."
"Tell that to the people who use me," said XML.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Johnson, Shaunn"
Дата:
Сообщение: calculating time
Следующее
От: Network Administrator
Дата:
Сообщение: Re: OT: mail server blocked