Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 631A0C76A58 for ; Sun, 26 Feb 2012 07:46:19 -0400 (AST) Received: from plane.gmane.org ([80.91.229.3]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S1cYU-0004SD-0U for pgsql-performance@postgresql.org; Sun, 26 Feb 2012 11:46:19 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S1cYF-0001c9-12 for pgsql-performance@postgresql.org; Sun, 26 Feb 2012 12:46:03 +0100 Received: from host-188-174-190-31.customer.m-online.net ([188.174.190.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Feb 2012 12:46:03 +0100 Received: from spam_eater by host-188-174-190-31.customer.m-online.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Feb 2012 12:46:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Thomas Kellerer Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory? Date: Sun, 26 Feb 2012 12:46:03 +0100 Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: host-188-174-190-31.customer.m-online.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/209 X-Sequence-Number: 46381 Stefan Keller wrote on 26.02.2012 01:16: > 2. Are there any hints on how to tell Postgres to read in all table > contents into memory? What about creating tablespace on a RAM Fileystem (tmpfs), then create a second schema in your database where all tables are located in the that "temp" tablespace. Then upon startup (or using triggers) you can copy all data from the persistent tables to the memory tables. It would probably make sense to change the value of random_page_cost for that tablespace to 1 I'm not sure though how PostgreSQL handles a system-restart with tables on a tablespace that might not be there. Thomas