Geeks With Blogs
Baskar B.V SQL - BI Consultant June 2008 Entries
forced index using WITH INDEX
When sql queries running very slower we can consider forcing an index using WITH INDEX command Syntax: Select * from <tablename> with (index(<index name>)) This we found very useful in one of our project where we were faced performance issues. Our code is basically querying a table with date condition. select @st_dt = max(field1) from table1 with (index (index_nm)) where field1 <= @start_dt The date value is passed through sql variable. The query is running for ever even though it ......

Posted On Thursday, June 26, 2008 1:59 PM

Copyright © Baskar B.V | Powered by: GeeksWithBlogs.net