pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedtemp tables versus the global sql area
2+ messages / 2 participants
[nested] [flat]
* temp tables versus the global sql area
@ 2001-12-16 23:54 Terrence Brannon <metaperl@mac.com>
2001-12-17 05:37 ` Re: temp tables versus the global sql area Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Terrence Brannon @ 2001-12-16 23:54 UTC (permalink / raw)
To: pgsql-sql
In the Momjian book it is stated:
Temporary tables are ideal for holding intermediate data used by
the current SQL session. For example, suppose you need to do many
SELECTs on the result of a complex query. An efficient strategy
is to execute the complex query once, then store the result in a
temporary table.
...However, my question is doesn't postgresql calculate the cost
of complex queries and store there result in some sort of global
sql area sorted by LRU or cost so that you can simply write
complex queries and take care of automatic caching?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: temp tables versus the global sql area
2001-12-16 23:54 temp tables versus the global sql area Terrence Brannon <metaperl@mac.com>
@ 2001-12-17 05:37 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2001-12-17 05:37 UTC (permalink / raw)
To: Terrence Brannon <metaperl@mac.com>; +Cc: pgsql-sql
> In the Momjian book it is stated:
>
> Temporary tables are ideal for holding intermediate data used by
> the current SQL session. For example, suppose you need to do many
> SELECTs on the result of a complex query. An efficient strategy
> is to execute the complex query once, then store the result in a
> temporary table.
>
>
> ...However, my question is doesn't postgresql calculate the cost
> of complex queries and store there result in some sort of global
> sql area sorted by LRU or cost so that you can simply write
> complex queries and take care of automatic caching?
Nope. Sorry. Those caches would have to be invalidated if someone made
a change to those tables.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-12-17 05:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-12-16 23:54 temp tables versus the global sql area Terrence Brannon <metaperl@mac.com>
2001-12-17 05:37 ` Bruce Momjian <pgman@candle.pha.pa.us>
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