Re: Best ODBC cursor and lock types for fastest reading?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Robert John Shepherd" <robert(at)reviewer(dot)co(dot)uk>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Best ODBC cursor and lock types for fastest reading?
Date: 2003-04-29 15:38:50
Message-ID: 200304290838.50503.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Robert,

> The following options are defined in ADO with which I can create a
> recordset with:
<snip>
> Do any of these offer a performance gain over others? I used to use
> adLockReadOnly with MS-SQL which really sped things up but this doesn't
> seem to work at all under Postgresql and I've been using
> adLockOptimistic instead.

All of the types you list were designed around the MS SQL/MSDE server
architecture, and many do not apply to PostgreSQL (for example, Postgres does
not use read locks and does not support client-side keyset cursors as far as
I know). I wouldn't be surprised to find out that the pgODBC driver is
ignoring most of these options as irrelevant -- you should contact the pgODBC
project to find out.

Certainly I wouldn't expect any setting other than adLockPessimistic to have
an effect on the speed at which you get rows from the server (Pessimistic
would presumably declare "SELECT FOR UPDATE", which would be slower).
However, one or more types might be faster on the client side than the
others; I recommmend that you set up a test case and experiment.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert John Shepherd 2003-04-29 15:43:26 Re: Best ODBC cursor and lock types for fastest reading?
Previous Message Tom Lane 2003-04-29 14:53:13 Re: Query Plan far worse in 7.3.2 than 7.2.1