I have a VB application and with the help of record sets i retrieve as many rows from the SQL Server 2000 DB.
The query that is in the SP is nested and so while retrieving it took 2 secs for a very few records and so I changed the query to a simple query but with more conditions on the WHERE clause..
But now also it takes the same 2 secs and i would like it to be reduced to milliseconds..
Any ideas are most welcome...
TIA,
NishaIf you can cut-n-paste the SQL into Query Analyzer you can Display the Query Plan (Ctrl+L) and see what Query Plan it's using, so you can determine whether indexes would help.
- Andy Abel|||It will be better if u put the script, u can use the Profiler to see the exact duration the Sql is taking,
Dont use Select * , better give the exact column names , and in the where condition u try to use id columns.
-Ashok|||Originally posted by iamnisha
I have a VB application and with the help of record sets i retrieve as many rows from the SQL Server 2000 DB.
The query that is in the SP is nested and so while retrieving it took 2 secs for a very few records and so I changed the query to a simple query but with more conditions on the WHERE clause..
But now also it takes the same 2 secs and i would like it to be reduced to milliseconds..
Any ideas are most welcome...
TIA,
Nisha
Reply-
Try to use 'primary key with clustured indexs' keys reference. after the where clause.
No comments:
Post a Comment