Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO vs. SPT, a benchmark test...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00522283
Message ID:
00522310
Views:
8
I think there are several differences. First, with ADO, most likely, you fetched a server-side forward-only recordset. As you scroll through the recordset, you are fetching the next record. With SPT, you are bringing all of the records down to the client.

Also, you have operations in your times that don't have a thing to do with fetching data. For instance, you have createobject calls in your time. I am not sure this makes for an accurate comparison with SPT.


Try using a client-side recordset in ADO. I think you will find that your times for ADO will dramatically increase.





>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform