pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Temporary table performance?
2+ messages / 2 participants
[nested] [flat]

* Temporary table performance?
@ 2003-06-26 16:14  Michael A Nachbaur <mike@nachbaur.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Michael A Nachbaur @ 2003-06-26 16:14 UTC (permalink / raw)
  To: pgsql-sql

Hello everyone,

In the Intranet application I've been building over the past 9 months, I have 
developed quite a beast of a search.  I've asked for help here in the past on 
performance tuning it, and have come to the conclusion that I've gotten it as 
tweaked as I can without seeking the counsel of a shamen.

What I'm looking at doing is improving in-page performance. In a nutshell, how 
expensive is it to create a temporary table?  I'd like to do something like:

CREATE TEMP TABLE SearchResults AS [......];

I could then do some queries against the temporary table without having to 
regenerate the results every time I want to show a "Page 299 of 500" toolbar.

Would I be better off just sucking this data into an in-memory data structure, 
or can I use a temp table as an easy-to-use alternative?

-- 
/* Michael A. Nachbaur <mike@nachbaur.com>
 * http://nachbaur.com/pgpkey.asc
 */

...[Arthur] leapt to his feet like an author hearing the phone ring...




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Temporary table performance?
@ 2003-06-26 17:23  Rod Taylor <rbt@rbt.ca>
  parent: Michael A Nachbaur <mike@nachbaur.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Rod Taylor @ 2003-06-26 17:23 UTC (permalink / raw)
  To: Michael A Nachbaur <mike@nachbaur.com>; +Cc: pgsql-sql

> I could then do some queries against the temporary table without having to 
> regenerate the results every time I want to show a "Page 299 of 500" toolbar.

Performance wise temp tables are the same as a regular table but without
WAL on the table contents.

> Would I be better off just sucking this data into an in-memory data structure, 
> or can I use a temp table as an easy-to-use alternative?

You are probably better off using a cursor.

-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-06-26 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 16:14 Temporary table performance? Michael A Nachbaur <mike@nachbaur.com>
2003-06-26 17:23 ` Rod Taylor <rbt@rbt.ca>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox