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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-odbc by date

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