Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Key Lookup(Clustered)

Author  Topic 

kuku
Starting Member

14 Posts

Posted - 2012-02-02 : 11:44:22
Hi everyone! Help me plz with a problem

In my query I join one table with another large table (about 194100 rows).I looked execution plan Cost:55 % Key Lookup Clustered took that join.
What can i do to resolve this problem? The query excecuted about 4 minutes

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-02 : 11:46:14
what are columns you're retrieving? try making a covering index to cover the entire column set you're trying to retrive. then you can get rid of keyword lookup as it will get details from index itself.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kuku
Starting Member

14 Posts

Posted - 2012-02-02 : 11:56:07
I'm retrieving only primary key column of that table and not using any condition with columns of that table
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-02 : 12:10:14
you mean you've only primary key in select list? what about filter conditions?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kuku
Starting Member

14 Posts

Posted - 2012-02-02 : 12:14:47
yeah,i mean only primary key column in select list.Only join condition,but I maked non-clustered index on that column,but it don't help
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-02 : 12:15:29
show me query please

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -