Re: Best ODBC cursor and lock types for fastest reading? - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Best ODBC cursor and lock types for fastest reading?
Date
Msg-id 200304290838.50503.josh@agliodbs.com
Whole thread Raw
In response to Best ODBC cursor and lock types for fastest reading?  ("Robert John Shepherd" <robert@reviewer.co.uk>)
Responses Re: Best ODBC cursor and lock types for fastest reading?
List 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


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query Plan far worse in 7.3.2 than 7.2.1
Next
From: "Robert John Shepherd"
Date:
Subject: Re: Best ODBC cursor and lock types for fastest reading?