Skip site navigation (1) Skip section navigation (2)

Re: ODBC Performance

From: Fábio Sato <sato(at)simepar(dot)br>
To: Joel Burton <joel(at)joelburton(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: ODBC Performance
Date: 2001-10-18 18:36:36
Message-ID: 3BCF2134.BE779A74@simepar.br (view raw or flat)
Thread:
Lists: pgsql-odbc
> > I'm using the ODBC Driver version 07_01_0007 with ADO and the performance
> > is very disappointing... I have a procedure that update 868 rows and it is
> > taking more than 5 minutes to complete.
> >
> > After some search on the mailing lists I've found similar problems but
> > didn't find any answer to them. Can someone help me?
> 
> Are you committing after each operation, or is the ODBC driver forcing
> this?
> 
> By "procedure", do you mean as PG-backend proc (in plpgsql or something
> like that), or do you mean client-side procedure that calls PG 868 times?
> 
> --
> 
> Joel BURTON  |  joel(at)joelburton(dot)com  |  joelburton.com  |  aim: wjoelburton
> Independent Knowledge Management Consultant

I think that the source code may be a better answer to your questions,
so this is basically what I'm doing:

---
Dim conn As ADODB.Connection
Dim codes() As Long
Dim array1() As Double
Dim array2() As Double
Dim array3() As Double
.
.
.
.
Dim array20() As Double
Dim size As Long

' The arrays have always the same size (868): Here they are resized and
filled with data
.
.
.

' Then I open the connection and do the updates

conn.Open "DSN=mydb;uid=username;pwd=mypassword"

For I = 0 To size - 1
  sql = "update mytable set value1 = " & array1(I) & ", value2 = " &
array2(I) & _
        ", value3 = " & array3(I) & ... & ", value20 = " & array20(I) &
-
        " where code = " & codes(I)
  conn.Execute(sql)
Next I

---

In response to

Responses

pgsql-odbc by date

Next:From: Joel BurtonDate: 2001-10-18 18:43:14
Subject: Re: ODBC Performance
Previous:From: Joel BurtonDate: 2001-10-18 17:48:03
Subject: Re: ODBC Performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group