views:

28

answers:

1

I was wondering what really is a Key lookup in a database ?

And what are the differences between Key Lookup and Business Rules?

Thank you guys !

+2  A: 

A key lookup is an operator used in a query plan and as a general rule points to a lack of a covering index

http://technet.microsoft.com/en-us/library/bb326635.aspx

I’m not sure about what context you are using business rules in, maybe some kind of check constraint?

Kevin Ross
Then if I get it right, keys lookup are here for optimization and business rules are here for data quality ? Is that right ?
Spredzy
Taken in that context then yes kind of, you might have a “business rule” i.e. a check constraint on the table that says something like the delivery date can not be greater than 30 days from the order date for example. A key lookup would be when running a query that does not have a covering index to return all the fields
Kevin Ross
Thanks for yours answers. Appreciate it !
Spredzy