X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0499B5341E for ; Mon, 4 Apr 2005 17:15:52 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76833-05 for ; Mon, 4 Apr 2005 16:15:42 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 4FEE053400 for ; Mon, 4 Apr 2005 17:15:41 +0100 (BST) Received: (qmail 8747 invoked by uid 1112); 4 Apr 2005 16:15:40 -0000 Date: Mon, 4 Apr 2005 11:15:40 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: alvin.yk@gmail.com Cc: pgsql-jdbc@postgresql.org, pgsql-performance@postgresql.org Subject: Re: 8.0.1 performance question. In-Reply-To: Message-ID: References: <26421.1112629761@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/14 X-Sequence-Number: 12621 On Tue, 5 Apr 2005 alvin.yk@gmail.com wrote: > I see statements below being executed non-stop. Who is triggering these > statemetns? Is this normal? What am I doing wrong? > > > 2005-04-04 18:05:00 CST PARSELOG: statement: SELECT attnotnull FROM > pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 > 2005-04-04 18:05:00 CST PARSELOG: statement: SELECT def.adsrc FROM > pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON > (a.attrelid=c.oid > ) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND > a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc > L > IKE '%nextval(%' These are the results of ResultSetMetaData.isNullable() and isAutoIncrement(), which your code is apparently calling. The results of these calls are cached on a per ResultSet data. We have discussed caching them at a higher level, but couldn't find a way to know when to flush that cache. Kris Jurka