Re: How to keep a table in memory?
От | Luke Lonergan |
---|---|
Тема | Re: How to keep a table in memory? |
Дата | |
Msg-id | C3E62232E3BCF24CBA20D72BFDCB6BF8078F7FE5@MI8NYCMAIL08.Mi8.com обсуждение исходный текст |
Ответ на | How to keep a table in memory? (adrobj <adrobj@yahoo.com>) |
Ответы |
Re: How to keep a table in memory?
|
Список | pgsql-hackers |
<p><font size="2">Vacuum is a better thing to run, much less CPU usage.<br /><br /> - Luke<br /><br /> Msg is shrt cuz mon ma treo<br /><br /> -----Original Message-----<br /> From: Greg Smith [<a href="mailto:gsmith@gregsmith.com">mailto:gsmith@gregsmith.com</a>]<br/> Sent: Monday, November 12, 2007 11:59 PM EasternStandard Time<br /> To: Alex Drobychev<br /> Cc: pgsql-hackers@postgresql.org<br /> Subject: Re: [HACKERS]How to keep a table in memory?<br /><br /> On Mon, 12 Nov 2007, Alex Drobychev wrote:<br /><br /> > Or any otherideas for "pinning" a table in memory?<br /><br /> If the table you're worried about is only 20MB, have you consideredjust<br /> running something regularly that touches the whole thing? This may be the<br /> only time I've everconsidered running "select count(*) from x" as a<br /> productive move. That would waste some CPU, but it would helpthose pages<br /> "win the eviction war" as you say.<br /><br /> You definately should follow-up on the suggestion givento look at the<br /> pg_buffercache contrib module to get a better idea what's going on under<br /> the LRU hood. Infact, you may want to install a tweak that's standard in<br /> 8.3 to show the usage counts in order to better get a feelfor what's<br /> going on; the appendix on my article at<br /><a href="http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm">http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm</a> goes<br/> into this a bit, with the documentation to pg_buffercache having the rest<br /> of what you'd need.<br /><br />--<br /> * Greg Smith gsmith@gregsmith.com <a href="http://www.gregsmith.com">http://www.gregsmith.com</a> Baltimore, MD<br/><br /> ---------------------------(end of broadcast)---------------------------<br /> TIP 6: explain analyze is yourfriend<br /></font>
В списке pgsql-hackers по дате отправления: