Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO vs. SPT, a benchmark test...
Message
De
22/06/2001 11:37:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00522283
Message ID:
00522521
Vues:
8
>It appears that ADO is significantly faster than SPT. Below code is just an example how I compared the performance:
>
>time1 = SECONDS()
>oConn = CREATEOBJECT("adodb.connection")
>oConn.Open("bbfsdsn","sa","")
>oCustomerRS = CREATEOBJECT("adodb.recordset")
>oCustomerRS.Open("SELECT * FROM patledger",oconn)
>time2 = SECONDS()
>
>WAIT WINDOW STR(time2-time1,10,2) && SHOWS 91.10 seconds
>
>Time1 = SECONDS()
>oConn = SQLCONNECT("BBFSDSN","sa","")
>cSQL = SQLEXEC(oConn,"SELECT * FROM patledger","oCustomerRS")
>TIME2 = SECONDS()
>
>WAIT WINDOW STR(time2-time1,10,2) && SHOWS 208.17 seconds
>
>BTW, patledger table contains 650,500 records.
>
>Any additional facts that confirms this is very much appreciated.

It's been that way since MDAC 2.1. And as John states, with a few tweaks it can run even faster.

Set the cursorlocation property of the connection to adUseClient and execute the SQL with the connection's Execute:

oRS = oConn.Execute("Select * From patledger")

And if this is to a SQL Server make sure you are using the OLEDB provider instead of a DSN as in your example.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform