X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1876411F61EA for ; Fri, 7 Apr 2006 12:01:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53235-03 for ; Fri, 7 Apr 2006 12:01:07 -0300 (ADT) X-Greylist: delayed 00:06:45.371873 by SQLgrey- Received: from mx1.bastionits.com (65.105.157.222.ptr.us.xo.net [65.105.157.222]) by postgresql.org (Postfix) with SMTP id 3878811F6031 for ; Fri, 7 Apr 2006 12:01:07 -0300 (ADT) Received: (qmail 83368 invoked from network); 7 Apr 2006 14:48:59 -0000 Received: from unknown (HELO ?10.0.0.110?) (10.0.0.110) by mx1.bastionits.com with SMTP; 7 Apr 2006 14:48:59 -0000 Message-ID: <44367D22.9060007@mattdavies.net> Date: Fri, 07 Apr 2006 08:54:26 -0600 From: Matt Davies | Postgresql List User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: "Charles A. Landemaine" CC: pgsql-performance@postgresql.org Subject: Re: Loading the entire DB into RAM References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200604/134 X-Sequence-Number: 18218 If memory serves me correctly I have seen several posts about this in the past. I'll try to recall highlights. 1. Create a md in linux sufficiently large enough to handle the data set you are wanting to store. 2. Create a HD based copy somewhere as your permanent storage mechanism. 3. Start up your PostgreSQL instance with the MD as the data store 4. Load your data to the MD instance. 5. Figure out how you will change indexes _and_ ensure that your disk storage is consistent with your MD instance. I haven't done so, but it would be interesting to have a secondary database somewhere that is your primary storage. It needn't be especially powerful, or even available. It serves as the place to generate your indexing data. You could then use SLONY to propogate the data to the MD production system. Of course, if you are updating your system that resides in ram, you should be thinking the other way. Have SLONY replicate changes to the other, permanent storage, system. Either way you do it, I can't think of an out of the box method to doing it. Somehow one has to transfer data from permanent storage to the md instance, and, likewise, back to permanent storage. Out of curiosity, what are you using as the search engine? Charles A. Landemaine wrote: > I have a web server with PostgreSQL and RHEL. It hosts a search > engine, and each time some one makes a query, it uses the HDD Raid > array. The DB is not very big, it is less than a GB. I plan to add > more RAM anyway. > > What I'd like to do is find out how to keep the whole DB in RAM so > that each time some one does a query, it doesn't use the HDD. Is it > possible, if so, how? > Thanks, > > Charles. > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > > >