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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Why is UseDeclareFetch so slow?



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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group