sql server 2008 - Tips on Creating More Efficient Queries

Hi experts, i am reading about Tips on Creating More Efficient Queries

Expressions that use column names in search arguments – WHERE (Price + $10) > $20

how I can replace this: WHERE (Price + $10) > $20
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
> WHERE (Price + $10) > $20
take you math course..
X + 10 > 20  can also be written as X > 20 - 10

this way, X stands alone, and the "math" of 20-10 will be done once (is a constant), instead of having to do the math X + 10 for each row, and compare that to a constant
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.