Re: Postgres performance comments from a MySQL user

Поиск
Список
Период
Сортировка
От Ernest E Vogelsinger
Тема Re: Postgres performance comments from a MySQL user
Дата
Msg-id 5.1.1.6.2.20030617013636.02e31a38@mail.vogelsinger.at
обсуждение исходный текст
Ответ на Re: Postgres performance comments from a MySQL user  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Postgres performance comments from a MySQL user  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
At 01:35 17.06.2003, Tom Lane said:
--------------------[snip]--------------------
>Arjen van der Meijden <acm@tweakers.net> writes:
>> Well, then there is not. It would still be nice, however, to know why
>> queries are faster the second time they're run, even if there is a 100%
>> cachehit for the first running query.
>
>Well, there are non-plan caches involved --- specifically the catalog
>cache and relation cache.  The first query issued against a given table
>in a session will incur the cost to load the cache entries needed, and
>the first few queries in a session incur quite a few cache loads to suck
>in basic information like pg_operator and pg_proc entries for common
>functions and operators.
>
>For example, on my machine with the regression database, the time for
>       explain select * from tenk1 where unique1 = 42;
>drops from ~18ms first time to ~5ms subsequent times.  AFAICS the only
>thing that could cause that difference is catcache/relcache loading.
>
>                       regards, tom lane
--------------------[snip]--------------------

But this wouldn't explain the huge differences I just posted (first query -
1500 msecs, follow-ups - 10 msec)

Just now I had the server sit for approx 20 minutes, rerunning the same
query resulted in 3155 msec, a followup again 10.85 msec.


--
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres performance comments from a MySQL user
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Interesting incosistent query timing