Re: Whether the function exists a in pgsql table or not?

Lists: pgsql-general
From: shuaixf <shuaixf(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Whether the function exists a in pgsql table or not?
Date: 2011-08-27 17:21:38
Message-ID: 1314465698439-4741670.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

In Oracle, when the table has few records, used frequently, it would use
"storage(buffer_pool keep)" to keep the data in cache instead of LRU
algorithm.

if the function exists in a pgsql table or not?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Whether-the-function-exists-a-in-pgsql-table-or-not-tp4741670p4741670.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Whether the function exists a in pgsql table or not?
Date: 2011-08-29 03:00:35
Message-ID: 4E5B00D3.9090904@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 08/27/2011 01:21 PM, shuaixf wrote:
> In Oracle, when the table has few records, used frequently, it would use
> "storage(buffer_pool keep)" to keep the data in cache instead of LRU
> algorithm.
>
> if the function exists in a pgsql table or not?
>

There aren't any controls to pin a table into memory in PostgreSQL. The
way the database uses both its dedicated buffer cache as well as the OS
one, it's hard to even define such a UI that would make sense--the
database doesn't have any control or interaction with the OS cache.

The mechanism for deciding what stays in the PostgreSQL cache is a bit
more complicated than an LRU, while the one in the OS probably is a
LRU. If the table is used frequently, it's very likely to stay in one
of the two caches anyway.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.


From: shuaixf <shuaixf(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Whether the function exists a in pgsql table or not?
Date: 2011-08-30 13:14:07
Message-ID: 1314710047350-4749963.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

My friend, thanks for your replay, however how to prove your view?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Whether-the-function-exists-a-in-pgsql-table-or-not-tp4741670p4749963.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.