|
You're correct given the way you've coded the SQL.Testing confirms for me that SQL is indeed faster if the first "hole" is somewhere out past 60-70% of the way into the file. This is consistent with the idea that the more I/O you do, the more likely SQL is to process better.
However, my conclusions' were based on Michael's SQL. While not 100%, I'm pretty sure his SQL won't
need the temp table or read the index more than once behind the scenes.
But testing would tell us for sure.
How would this be faster than just reading 500,000 records
sequentially? There is no magic in SQL, except that it doesn't need to
bounce back and forth between the HLL and the SLIC. But I can't see how
that will help this particular problem.
My conclusions assume Michaels' SQL will read through the index once.
Thus, the SQL would be faster....
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.