Good Day.
I wanna search for records between to dates. What is the fastest and most efficient way of doing this seeing that i use a database of almost 200000 thousand records. What would be the correct sql statement to use....?
Thanks in advance..
Good Day.
I wanna search for records between to dates. What is the fastest and most efficient way of doing this seeing that i use a database of almost 200000 thousand records. What would be the correct sql statement to use....?
Thanks in advance..
Do, or do not. There is no 'try'.
Joffies
Firstly create an index on these date fields and then use something similar to the following
[Field] Between [From Date] AND [To Date]
Depending on what database you are using you may have to add # on the begining and end of the date search criteria
If you've got a database with 200 million records then you might also want to think about 'horizontally partioning' your table. That'll have a significant impact on performance - especially if you store each partition on a separate box...