Click here to Skip to main content
15,878,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have simple sql query with 8 tables of which 3 tables have 30, 60 and 80 lakhs of records
I have applied inner joins on tables to which 35 lakhs of records of displayed but to display these records its takes hell lot of time.
I have applied index on the date column used in where clause and have also applied index on primary keys of the tables having lakhs of records.
for date column in where clause instead of between I have used "greater than equal to (>)" and "less than equal to (<)" operator.
Apart from above steps what other steps can I apply to improve the performance of the query.
Posted
Updated 1-Oct-10 4:46am
v3

1 solution

You could try using a BETWEEN statement in the date where clause. Don't know what the cost difference is in the execution between that and what you have. its an alternative though :) e.g.

WHERE 'datecol' BETWEEN 'firstdate' AND 'seconddate'
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900