Forum Moderators: open

Message Too Old, No Replies

Execution of .movenext

Why is this so much slower....

         

woop01

1:00 am on May 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm having trouble getting an ASP script to execute quickly.

"SELECT Name FROM example WHERE Name NOT IN (SELECT name FROM example2 WHERE [criteria is met])"

"SELECT * FROM example"

Both statements execute quickly enough to ignore optimizing the query. However, when I try to loop through the results using a .movenext and looping until .eof is true the first query takes MUCH more time than the second.

I'm not an expert at ASP programming but I've been doing it for a few months now. Any advice would be greatly appreciated.

makeupalley

1:04 am on May 19, 2003 (gmt 0)

10+ Year Member



try this:

[4guysfromrolla.com...]

woop01

1:20 am on May 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That works quite well, but isn't quite appropriate for this query. I'm just wondering why the first query takes so much longer to loop through than the second even when they both return the same number of rows.

makeupalley

4:17 am on May 19, 2003 (gmt 0)

10+ Year Member



why do you say that this "isn't quite appropriate for this query"?

woop01

4:21 am on May 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Because on each row there is an if statement that formats various rows and also sets up form inputs.

makeupalley

4:35 am on May 19, 2003 (gmt 0)