General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Is SELECT ... IN (subquery) Optimized?
Hi Everyone,
This query returns no records:
SELECT gen.file_id ;
FROM datatrac!gen gen ;
WHERE gen.trade_no = 0 .AND. (gen.app_date >= DATE()-30) ;
INTO CURSOR tmp_cur1 NOFILTER
This query takes 50 seconds to execute:
SELECT gen.int_rate ;
FROM gen ;
WHERE gen.file_id IN (SELECT file_id FROM tmp_cur1) INTO CURSOR tmp_cur2
Because the first query has NO records and because it's taking 50 seconds, my assumption is that the 2nd query is not optimized. Does anybody know if SELECT ... IN (subquery) is unoptimized IN VFP 6.0?
Please help if you can. Thank you. Good to see all of you at the DevCon. Need to update my picture. I think that's from highschool! :)
Shawn Nelson
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only