Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id ED2239FA145 for ; Wed, 17 Jan 2007 08:59:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 81860-05 for ; Wed, 17 Jan 2007 08:58:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id D3CD49FB223 for ; Wed, 17 Jan 2007 08:59:03 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1H7AXS-0007yB-1e for pgsql-sql@postgresql.org; Wed, 17 Jan 2007 08:09:14 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 2683041A2; Wed, 17 Jan 2007 07:58:57 -0500 (EST) Date: Wed, 17 Jan 2007 07:58:57 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Postgresql & Oracle Heteregenous services - strange behaviour Message-ID: <20070117125857.GD19527@phlogiston.dyndns.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/68 X-Sequence-Number: 27220 On Wed, Jan 17, 2007 at 01:52:25PM +0100, Marcin St?pnicki wrote: > I see this in postgresql logs: > > [6210] DEBUG: query: select * from "zew_patients" > [6210] DEBUG: query: SELECT "A1"."p_nr_pesel" FROM "zew_patients" > "A1" WHERE ("A1"."p_patient_id" = 19300) > > The point is, I don't why oh why the first select is issued (some cache?), I bet it's getting the column list from the table or some such thing. This is a lousy way to do it (the information_schema would be more correct, although maybe no faster). The reason it isn't repeated, I bet, is that your connection is persistent, so the information gets cached. A -- Andrew Sullivan | ajs@crankycanuck.ca Everything that happens in the world happens at some place. --Jane Jacobs