dbTalk Databases Forums  

Multiple SELECTs cached by Postgres?

comp.databases.postgresql comp.databases.postgresql


Discuss Multiple SELECTs cached by Postgres? in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Multiple SELECTs cached by Postgres? - 09-08-2008 , 02:14 AM






Johannes Bauer <dfnsonfsduifb (AT) gmx (DOT) de> wrote:
Quote:
now() is docmented as the transaction start time, so theres no caching
and inside the same transaction its result should always be the same value.

For resolving performance questions EXPLAIN gives You valuable insight.

Oh yes, I forget to mention: I tried EXPLAIN, but it returns the same
search tree twice. However I do not know if EXPLAIN knows about caching
and would display that. Therefore I think that maybe the queries might
be cached although EXPLAIN states there is a (for example) seq search.
There is no result caching in PostgreSQL.

I think that would be difficult - it could be that some other transaction
has modified the database between the first and the second time the query
is issued.
How should the server determine if a concurrent change to the database has
invalidated the first result?

Yours,
Laurenz Albe


Reply With Quote
  #32  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Multiple SELECTs cached by Postgres? - 09-08-2008 , 02:14 AM






Johannes Bauer <dfnsonfsduifb (AT) gmx (DOT) de> wrote:
Quote:
now() is docmented as the transaction start time, so theres no caching
and inside the same transaction its result should always be the same value.

For resolving performance questions EXPLAIN gives You valuable insight.

Oh yes, I forget to mention: I tried EXPLAIN, but it returns the same
search tree twice. However I do not know if EXPLAIN knows about caching
and would display that. Therefore I think that maybe the queries might
be cached although EXPLAIN states there is a (for example) seq search.
There is no result caching in PostgreSQL.

I think that would be difficult - it could be that some other transaction
has modified the database between the first and the second time the query
is issued.
How should the server determine if a concurrent change to the database has
invalidated the first result?

Yours,
Laurenz Albe


Reply With Quote
  #33  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Multiple SELECTs cached by Postgres? - 09-08-2008 , 02:14 AM



Johannes Bauer <dfnsonfsduifb (AT) gmx (DOT) de> wrote:
Quote:
now() is docmented as the transaction start time, so theres no caching
and inside the same transaction its result should always be the same value.

For resolving performance questions EXPLAIN gives You valuable insight.

Oh yes, I forget to mention: I tried EXPLAIN, but it returns the same
search tree twice. However I do not know if EXPLAIN knows about caching
and would display that. Therefore I think that maybe the queries might
be cached although EXPLAIN states there is a (for example) seq search.
There is no result caching in PostgreSQL.

I think that would be difficult - it could be that some other transaction
has modified the database between the first and the second time the query
is issued.
How should the server determine if a concurrent change to the database has
invalidated the first result?

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.