Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D55096B258B for ; Thu, 29 Dec 2011 12:13:06 -0400 (AST) Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RgIbG-0005f3-Rq for pgsql-performance@postgresql.org; Thu, 29 Dec 2011 16:13:06 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RgIb3-0008Ei-OD for pgsql-performance@postgresql.org; Thu, 29 Dec 2011 08:12:49 -0800 Date: Thu, 29 Dec 2011 08:12:49 -0800 (PST) From: MirrorX To: pgsql-performance@postgresql.org Message-ID: <1325175169744-5107985.post@n5.nabble.com> In-Reply-To: <4EFB5042020000250004418B@gw.wicourts.gov> References: <1324983133749-5102940.post@n5.nabble.com> <4EFB5042020000250004418B@gw.wicourts.gov> Subject: Re: parse - bind take more time than execute MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.0 (/) X-Archive-Number: 201112/203 X-Sequence-Number: 46002 thx for your reply :) -the timings come from the log -the table is this -> \d configurations Table "public.configurationcontext" Column | Type | Modifiers -------------------+------------------------+----------- id | numeric(18,0) | not null category | numeric(18,0) | pr_oid | numeric(18,0) | var_attrs | character varying(255) | num_value | numeric(18,0) | Indexes: "pk_configurations" PRIMARY KEY, btree (id) "conf_index" btree (category, pr_oid, num_value) and one query is this -> SELECT * FROM configurations WHERE pr_oid=$1 AND num_value=$2 -the table has only 2500 rows -this messages used to appear a lot after i created a new index for the 2 columns mentioned above in the query, since i thought that the 3-column index wouldnt be of much help since the first column was not defined in the query. now i have dropped this extra index and i see much less records in the log about the bind/parse phase of the query -the server has 4 cores, 12 GB ram, and fata disks. the settings from the query are these -> name | current_setting ---------------------------------+------------------------------------------------------------------------------------------------------------------ version | PostgreSQL 8.4.7 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50), 64-bit archive_command | cp -i %p /var/lib/pgsql/wals/%f