Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fireali
Starting Member
2 Posts |
Posted - 2005-08-13 : 01:39:27
|
| Hi everybody!I got a problem with this code(VB 6): Dim Cnn as New ADODB.ConnectionDim Rs as New ADODB.RecordsetCnn.Open "Driver=Sql Server;DATABASE=mydb;Server=10.0.0.1", "usr", "pass"Sql = "SELECT * FROM myTable where ..."Rs.Open Sql,Cnn,1,3Although this code works, but it's too slow(my recordset only includes 15 records), it takes about 1 or 2 minutes to execute. I think it's all about the Cnn.Open method. How can I overcome this problem?Thanks,Ali. |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-08-13 : 11:15:28
|
| You say your recordset only has 15 records but how many does your table have? How long does the query take on its own?steveAlright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer. |
 |
|
|
Stalker
Yak Posting Veteran
80 Posts |
Posted - 2005-08-14 : 00:43:41
|
| >>How long does the query take on its own?yeah, did you try to run your query in QA ? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-16 : 02:27:59
|
| Did you use index for the key column?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|