Temporary Tables and Web Application

Поиск
Список
Период
Сортировка
От Tim Tassonis
Тема Temporary Tables and Web Application
Дата
Msg-id 484807FC.3050309@cubic.ch
обсуждение исходный текст
Ответы Re: Temporary Tables and Web Application  (Bill Moran <wmoran@collaborativefusion.com>)
Re: Temporary Tables and Web Application  (Tino Wildenhain <tino@wildenhain.de>)
Re: Temporary Tables and Web Application  ("Marco Bizzarri" <marco.bizzarri@gmail.com>)
Список pgsql-general
Hi all

I assume this is not an uncommon problem, but so far, I haven't been
able to find a good answer to it.

I've got a table that holds log entries and fills up very fast during
the day, it gets approx. 25 million rows per day. I'm now building a web
application using apache/mod_php where you can query the database and
then should be able to page through the results.

My idea was that whenever a user constructs a query, I create a
temporary table holding the results and then page through this table,
which should work very well in principle.

But from what I've been able to find out, temporary tables live only in
the Postgres Session they have been created in and are destroyed upon
session descructuion.

Now, with apache/php in a mpm environment, I have no guarantee that a
user will get the same postgresql session for a subsequent request, thus
he will not see the temporary table.

Is there a way to create temporary tables in another way, so they are
visible between sessions, or do I need to create real tables for my
purpose? And is the perfomance penalty big for real tables, as they have
been written to disk/read from disk?


Tim


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

Предыдущее
От: Bjørn T Johansen
Дата:
Сообщение: Re: How can I compare sql create script with running database?
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Temporary Tables and Web Application