X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id D44C79254BC for ; Mon, 19 May 2003 17:56:52 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 29062-03 for ; Mon, 19 May 2003 17:56:49 -0400 (EDT) Received: from news.hub.org (unknown [64.117.225.234]) by developer.postgresql.org (Postfix) with ESMTP id 38497925A4E for ; Mon, 19 May 2003 15:11:51 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 35BF02534AC; Mon, 19 May 2003 15:11:47 -0400 (EDT) From: Jeff Boes X-Newsgroups: comp.databases.postgresql.sql Subject: Performance on temp table inserts Date: Mon, 19 May 2003 15:11:48 -0400 Organization: Nexcerpt, Inc. Lines: 26 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@news.hub.org User-Agent: Pan/0.11.4 (Unix) X-Comment-To: ALL To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/365 X-Sequence-Number: 13530 What factors affect the performance of a temp table insert? On nearly identical boxes, I have recorded these kinds of statistics: "INSERT INTO temp_link_checksums VALUES (?)","25957","0.009","245.546" (That's the statement text, the number of executions, the average, and the total wallclock time.) "INSERT INTO temp_link_checksums VALUES (?)","76962","0.041","3184.835" Box #1 is our "production" server, and actually has more going on during the day than #2 which is the "test" server. #1 has "shared_buffers" set to 131072; #2 has it at 250000. Hardware, O/S and PostgreSQL versions are all identical. Software executing the query (Perl code using DBI) is the same. I don't have stats on std-dev for these results; I suppose there could be an outlying value in the #2 box that dragged down the average. But before I re-instrument my statistics-gathering code, I thought I'd check to see if anyone knows how temp tables and shared memory might interact. -- Jeff Boes vox 269.226.9550 ext 24 Database Engineer fax 269.349.9076 Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt... Extend your Expertise