Re: Cache Query..

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Cache Query..
Дата
Msg-id 20030717131835.GD3426@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Cache Query..  (jerome <jerome@gmanmi.tv>)
Список pgsql-general
On Fri, Jul 18, 2003 at 03:40:25AM +0800, jerome wrote:
> im creating a page that will be queried from time to time... to output the
> results in a fast manner the easiest way is to return cached results... i was
> thinking if postgres can do this... otherwise hope the webserver (aol) can
> help me..

Well, if you don't need it to be 100% accurate, you can create a table
with the results that is generated from time to time.  Better yet,
TRUNCATE the table and fill with the new data in a single transaction;
queries still running will be able to see the old data so you won't have
'downtime'.  Maybe you could even truncate the results table in a
trigger as soon as the original data is modified.  (The best part of
this approach is that you won't need to vacuum the table.)

Not sure if rollbackable truncate is in 7.3 though...  it's in 7.4 for
sure.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos / con todos los humanos acabaré (Bender)

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

Предыдущее
От: Jason Godden
Дата:
Сообщение: Re: 2 connections 1 transaction
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Postgresql "FIFO" Tables, How-To ?