Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What makes RS.move slow down?

Status
Not open for further replies.

jel

Programmer
Feb 17, 2002
349
NL
I' openened a serverside recordset, sql: "SELECT id FROM firsttable WHERE fk IN(SELECT pk FROM secondtable WHERE somefield=?)".
CacheSize of the recordset is 20, recordcount of the complete firsttable is some ten-thousands.
I get the first 20 records pretty fast, for any value of '?'.

My next statement is: RS.Move X.
To my surprise, this is pretty fast for some values for '?', but takes more then 10 seconds for other values, even if X=0.
It seems that it gets slower if there are less firsttable-records that meet the criterium (IN etc).
I can undersand that RS.Move 10000 would take some more time if more firsttable-records have to checked, but what really puzzles me is: how can even RS.Move 0 take sooooo much more time then the first RS.Open ?
 
ADODB, SQL-server database
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top