Re: Postgresql & Oracle Heteregenous services - strange behaviour - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: Postgresql & Oracle Heteregenous services - strange behaviour
Date
Msg-id 20070117125857.GD19527@phlogiston.dyndns.org
Whole thread Raw
In response to Postgresql & Oracle Heteregenous services - strange behaviour  (Marcin Stępnicki <mstepnicki@gmail.com>)
Responses Re: Postgresql & Oracle Heteregenous services - strange behaviour  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
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?),

<speculation level="rank">

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.

</speculation>

A
-- 
Andrew Sullivan  | ajs@crankycanuck.ca
Everything that happens in the world happens at some place.    --Jane Jacobs 


pgsql-sql by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Update query by joining multiple tables.
Next
From: Richard Huxton
Date:
Subject: Re: Postgresql & Oracle Heteregenous services - strange behaviour