pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Gardner <david@gardnerit.net>
To: pgsql-odbc@postgresql.org
Subject: Re: Why is UseDeclareFetch so slow?
Date: Wed, 27 Jun 2007 09:02:54 -0700
Message-ID: <46828A2E.6020201@gardnerit.net> (raw)
In-Reply-To: <6ft483p1sfcupaid9hb778vsj3cg3bnlnh@4ax.com>
References: <csln73hi8pu9rlglofd6rikde0ss9199fg@4ax.com>
	<4681B973.6080101@tpf.co.jp>
	<6ft483p1sfcupaid9hb778vsj3cg3bnlnh@4ax.com>

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
>   




view thread (5+ messages)

Message-ID: <46828A2E.6020201@gardnerit.net>
Permalink:  ../46828A2E.6020201@gardnerit.net/
Also on:    postgresql.org/message-id/46828A2E.6020201@gardnerit.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: david@gardnerit.net
  Subject: Re: Why is UseDeclareFetch so slow?
  In-Reply-To: <46828A2E.6020201@gardnerit.net>
  References: <csln73hi8pu9rlglofd6rikde0ss9199fg@4ax.com> <4681B973.6080101@tpf.co.jp> <6ft483p1sfcupaid9hb778vsj3cg3bnlnh@4ax.com> <46828A2E.6020201@gardnerit.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox