X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 84AFC475ADE for ; Tue, 29 Apr 2003 11:40:06 -0400 (EDT) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 8659B475ADE for ; Tue, 29 Apr 2003 11:39:27 -0400 (EDT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2996181; Tue, 29 Apr 2003 08:38:54 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "Robert John Shepherd" , Subject: Re: Best ODBC cursor and lock types for fastest reading? Date: Tue, 29 Apr 2003 08:38:50 -0700 User-Agent: KMail/1.4.3 References: <001701c30e56$b0964400$f3b0313e@LAIKA> In-Reply-To: <001701c30e56$b0964400$f3b0313e@LAIKA> MIME-Version: 1.0 Message-Id: <200304290838.50503.josh@agliodbs.com> Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-31.1 required=5.0 tests=BAYES_01,IN_REP_TO,NO_DNS_FOR_FROM,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/247 X-Sequence-Number: 1753 Robert, > The following options are defined in ADO with which I can create a > recordset with: > 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=20 architecture, and many do not apply to PostgreSQL (for example, Postgres do= es=20 not use read locks and does not support client-side keyset cursors as far a= s=20 I know). I wouldn't be surprised to find out that the pgODBC driver is=20 ignoring most of these options as irrelevant -- you should contact the pgOD= BC=20 project to find out. Certainly I wouldn't expect any setting other than adLockPessimistic to hav= e=20 an effect on the speed at which you get rows from the server (Pessimistic= =20 would presumably declare "SELECT FOR UPDATE", which would be slower).=20=20= =20 However, one or more types might be faster on the client side than the=20 others; I recommmend that you set up a test case and experiment. --=20 Josh Berkus Aglio Database Solutions San Francisco