Re: sql performance and cache

Поиск
Список
Период
Сортировка
Искать
От
Christopher Kings-Lynne
Тема
Re: sql performance and cache
Дата
Msg-id
3F87D764.8030306@familyhealth.com.au
Ответ на
sql performance and cache (Chris Faulkner)
Список
Дерево обсуждения
sql performance and cache "Chris Faulkner" <chrisf@oramap.com>
Re: [SQL] sql performance and cache Richard Huxton <dev@archonet.com>
Re: [SQL] sql performance and cache "Chris Faulkner" <chrisf@oramap.com>
Re: [SQL] sql performance and cache Richard Huxton <dev@archonet.com>
Re: [SQL] sql performance and cache Josh Berkus <josh@agliodbs.com>
Re: [SQL] sql performance and cache Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: [SQL] sql performance and cache Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: sql performance and cache johnnnnnn <john@phaedrusdeinus.org>
Re: sql performance and cache Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: sql performance and cache Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: [SQL] sql performance and cache Wei Weng <wweng@kencast.com>
Re: sql performance and cache Rod Taylor <rbt@rbt.ca>
Re: [SQL] sql performance and cache Tom Lane <tgl@sss.pgh.pa.us>

> I have two very similar queries which I need to execute. They both have
> exactly the same from / where conditions. When I execute the first, it takes
> about 16 seconds. The second is executed almost immediately after, it takes
> 13 seconds. In short, I'd like to know why the query result isn't being
> cached and any ideas on how to improve the execution.



> OK - so I could execute the query once, and get the maximum size of the
> array and the result set in one. I know what I am doing is less than optimal
> but I had expected the query results to be cached. So the second execution
> would be very quick. So why aren't they ? I have increased my cache size -
> shared_buffers is 2000 and I have doubled the default max_fsm... settings
> (although I am not sure what they do). sort_mem is 8192.

PostgreSQL does not have, and has never had a query cache - so nothing 
you do is going to make that second query faster.

Perhaps you are confusing it with the MySQL query cache?

Chris

В списке pgsql-performance по дате отправления
От: Chris Faulkner
Дата:
Сообщение: sql performance and cache
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: sql performance and cache
FAQ