Re: How to keep a table in memory?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to keep a table in memory?
Date: 2007-11-13 19:13:31
Message-ID: 200711131113.31258.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All,

> I'm not sure what the solution is. This scenario is going to be a problem
> for any system which tries to judge future usage based on past usage. If
> the infrequent query with a strict response time requirement is infrequent
> enough any automatic algorithm will evict it.

The way Greg puts this it sounds extremely hypothetical, but it's actually
pretty common.

For example, I had an application which was primarily data entry but
periodically (one per 10 minutes or so) would run a heavy-duty full-text
search. This caused the full-text index to go to disk alot ... but since the
data entry was employees and the FTS was for customers, we'd have rather had
the FTI "pinned" in memory and the data entry be 50% slower. (in the end, we
solved the issue with a ramdisk but that was a bit of a hack and involved
spending $$$ on RAM)

Mind you, that's a case of needing to have an *index* pinned, but I think
those are just as common. Overall, it's a problem of having applications
where response time is *not* tied to frequency of usage.

--
Josh Berkus
PostgreSQL @ Sun
San Francisco

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2007-11-13 19:19:25 Re: LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris
Previous Message Martijn van Oosterhout 2007-11-13 19:09:57 Re: Windows psql -f load of files with tabs changing to escape sequences