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?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!