Re: Discarding the resulting rows

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Discarding the resulting rows
Дата
Msg-id 4BD5A4D20200002500030E0B@gw.wicourts.gov
обсуждение исходный текст
Ответ на Discarding the resulting rows  ("Murali M. Krishna" <murali1729@yahoo.com>)
Ответы Re: Discarding the resulting rows
Re: Discarding the resulting rows
Список pgsql-hackers
"Murali M. Krishna" <murali1729@yahoo.com> wrote:
> Basically, I would like to discard the result rows after doing all
> the work required to execute the query.
I would use EXPLAIN ANALYZE SELECT ...
> I looked at the documentation and I saw something about using the
> keyword PERFORM rather than SELECT.
I don't remember ever seeing anything like that.  Do you have a URL?
> How do I clear the buffer caches between two query runs?
The easiest way to clear the PostgreSQL cache is to restart the
service.  PostgreSQL goes through the OS cache; so you'll need to
clear that, too.  How you do that is dependent on your OS.  Of
course, in most real use cases, a significant portion of the
database would be cached, so unless you're dealing with a very
unusual situation, it's hard to see what the value would be of such
a benchmark, unless you're trying to create an artificial "worst
case" scenario for bounding purposes.
Oh, and most serious database servers have 256MB or more of battery
backed cache on the RAID controller; don't forget to deal with that
somehow.
-Kevin


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: global temporary tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: global temporary tables