From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Postgresql & Oracle Heteregenous services - strange behaviour |
Date: | 2007-01-17 13:04:28 |
Message-ID: | 45AE1EDC.7090005@archonet.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Andrew Sullivan wrote:
> 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).
That'd be my guess. And then it's not fetching any rows, expecting
cursor-like behaviour. Of course we fetch all the rows before returning
any results.
The real solution would be to add "LIMIT 0" or "LIMIT 1" to the
column-finding query, but I doubt that's possible with the Oracle plugin.
Perhaps check if there's a "fetch N rows at a time" option for the ODBC
setup that might help you.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Stępnicki | 2007-01-17 13:25:41 | Re: Postgresql & Oracle Heteregenous services - strange behaviour |
Previous Message | Andrew Sullivan | 2007-01-17 12:58:57 | Re: Postgresql & Oracle Heteregenous services - strange behaviour |