Re: Pinning a table into memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Blood" <david(at)matraex(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Pinning a table into memory
Date: 2002-10-04 18:47:47
Message-ID: 25545.1033757267@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-performance pgsql-sql

"David Blood" <david(at)matraex(dot)com> writes:
> In Oracle you can Pin large objects into memory to prevent frequent
> reloads. Is there anyway to do this with Postgres?

I can never understand why people think this would be a good idea.
If you're hitting a table frequently, it will stay in memory anyway
(either in Postgres shared buffers or kernel disk cache). If you're
not hitting it frequently enough to keep it swapped in, then whatever
is getting swapped in instead is probably a better candidate to be
occupying the space. ISTM that a manual "pin this table" knob would
mostly have the effect of making performance worse, whenever the
system activity is slightly different from the situation you had in
mind when you installed the pin.

Having said that, I'll freely concede that our cache management
algorithms could use improvement (and there are people looking at
that right now). But a manual pin doesn't seem like a better answer.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-10-04 19:12:05 Re: DTOI4 integer out of range
Previous Message Diogo Biazus 2002-10-04 18:39:06 Re: Problem with createview

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2002-10-04 18:50:33 Re: Return of INSTEAD rules
Previous Message Manfred Koizar 2002-10-04 17:57:47 Re: Correlation in cost_index()

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2002-10-04 19:09:42 Re: Comparitive UPDATE speed
Previous Message Andrew Sullivan 2002-10-04 18:25:23 Re: Comparitive UPDATE speed

Browse pgsql-sql by date

  From Date Subject
Next Message Dagoberto Torres 2002-10-04 21:01:54 sum function
Previous Message David Blood 2002-10-04 16:46:57 Pinning a table into memory