Change execution plan from index scan to index seek

pts.
Tags:
SQL Server
We are running the following sql: SELECT c.status from sysobjects t , syscolumns c where t.id =c.id and t.uid =user_id ( ) and upper ( ltrim ( rtrim ( t.name ) ) ) =upper ( ltrim ( rtrim ( 'ADD_SPEC1' ) ) ) and upper ( ltrim ( rtrim ( c.name ) ) ) =upper ( ltrim ( rtrim ( 'spec_udf_c133' ) ) ) On the poorly performing system the explain plan shows index scan on syscolumns which has over 1 million rows. On system that is performing well, the explain plan shows an index seek on syscolumns. How can I force the poorly performing system to use an index seek on syscolumns? Thank you.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Read this article and see how it applies to your situation.

http://www.sql-server-performance.com/q&a91.asp

Kevin

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following