Skip site navigation (1) Skip section navigation (2)

Re: Why is UseDeclareFetch so slow?

From: David Gardner <david(at)gardnerit(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Why is UseDeclareFetch so slow?
Date: 2007-06-27 16:02:54
Message-ID: 46828A2E.6020201@gardnerit.net (view raw or flat)
Thread:
Lists: pgsql-odbc
It has been my experience, which is largely with Access as a client, 
already attempts to perform similar optimizations to my queries.
Often Access will take a query like:

SELECT * FROM PersonTbl;

and turn it into:

SELECT * FROM PersonTbl WHERE "PersonID" = 10566 OR "PersonID" = 10568 
OR "PersonID" = 10365 OR "PersonID" = 10705 OR "PersonID" = 10390 OR 
"PersonID" = 10391 OR "PersonID" = 10392 OR "PersonID" = 10447 OR 
"PersonID" = 10403 OR "PersonID" = 10414;

> Yes, but the real question is why is the query 4 times slower when
> UseDeclareFetch is enabled (FETCH was set to 100)?
>
> I would have expected that the ODBC driver is fetching 100 rows in advance and
> thus the query should execute in less than a second instead of 30 seconds.
>
> Rainer
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>   


In response to

pgsql-odbc by date

Next:From: Mark Cave-AylandDate: 2007-06-27 21:22:39
Subject: Re: Proposal for new pgsqlODBC feature -hiding tables inaccessible to the current user
Previous:From: Hiroshi InoueDate: 2007-06-27 14:46:20
Subject: Re: Why is UseDeclareFetch so slow?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group