Re: Compression on ODBC?

From: "David C(dot) Hartwig Jr" <dchartwig(at)home(dot)com>
To: Mark Alliban <MarkA(at)idnltd(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Compression on ODBC?
Date: 2000-06-13 13:23:42
Message-ID: 394635DE.C2718E61@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Alliban wrote:

> Hi,
>
> I have an application which dials a modem, and connects to Postgres using
> ODBC. When I call the SQLExecDirect function to get the (quite large: 10000
> rows) result set, it takes a long time to execute. The query itself is
> indexed and runs very quickly from psql. I presume the delay is because the
> ODBC is downloading all the rows. Is there any way to either:
>
> 1) Use compression on the recordset to make the call faster?
> 2) Download each row one at a time, when SQLFetch is called?
>
> Also I don't seem to be able to find an ODBC function to return the number
> of records in a results set. Is there one?
>
> TIA,
> Mark.

Its been a while since I have used the ODBC driver, but I believe if you set
the Declare/Fetch driver option you will get a better response time. This
option uses a cursor to bring in the rows in set. I believe the default is
to cache 100 rows at a time - on demand. Kind of a lazy retrieval thing.
The side effect of using this option is that as long as that record set is in
use, you must open another separate connection to perform other database
operations. Hope this helps.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David C. Hartwig Jr 2000-06-13 14:18:58 Re: Compression on ODBC?
Previous Message Kshipra 2000-06-13 13:15:07 ROLLBACK problem