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

Re: ODBC Performance

From: "Andrea Aime" <aaime(at)comune(dot)modena(dot)it>
To: Fábio Sato <sato(at)simepar(dot)br>
Cc: Joel Burton <joel(at)joelburton(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: ODBC Performance
Date: 2001-10-19 07:00:50
Message-ID: 3BCFCFA2.CFD2221D@comune.modena.it (view raw or flat)
Thread:
Lists: pgsql-odbc
Fábio Sato wrote:
> 
> Joel Burton wrote:
> >
> > On Thu, 18 Oct 2001, [iso-8859-1] Fábio Sato wrote:
> >
> > > > > is very disappointing... I have a procedure that update 868 rows and it is
> > > > > taking more than 5 minutes to complete.
> > >
> > > I think that the source code may be a better answer to your questions,
> > > so this is basically what I'm doing:
> > >
> > > conn.Open "DSN=mydb;uid=username;pwd=mypassword"
> >
> > conn.Execute("begin")
> >
> > > 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
> >
> > conn.Execute("commit")
> >
> > Does this help?
> 
> No. I didn't change even the seconds... :(
> 

Strange, I got much better timing on a similiar situation
with transactions... can you try this?

 Dim conn As New ADODB.Connection
  Dim com As New ADODB.Command
  Dim i As Long
  
  conn.Open "DSN=mydb;uid=username;pwd=mypassword"
  Set com.ActiveConnection = com
  
  conn.BeginTrans
  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)
    com.CommandText = sql
    com.Execute adExecuteNoRecords + adCmdText
  Next i
  conn.CommitTrans

Also, have you updated to the latest ADO version (I'm using ADO 2.6)?
Is all logging disabled?
Hope this helps
Best regards
Andrea Aime

In response to

pgsql-odbc by date

Next:From: Ryan C. BonhamDate: 2001-10-19 14:10:04
Subject: Re: ODBC ServerSide Cursors Error
Previous:From: Eiji TokuyaDate: 2001-10-19 05:08:10
Subject: Re: Support for Special Big5 double-byte characters

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