Here is a great webpage that any SQL developer should read once in a while. It is a refresher course on some of the things you might have learned in college but forgot. sometimes we get in the habit of coding a certain way and get lazy
http://www.awprofessional.com/articles/article.asp?p=30247&seqNum=2&...
Tonight I was doing a little coding (girlfriend and I had a huge fight so I went back to the office) I just happened to change a couple things in the where clause around and noticed that the speed was improved. Since I was amazed and confused at the same time. My ADHD got the best of me and I quickly ignored my script I needed to write before tommorrow morning and spent the next 2 hours of my life solving this little puzzle.
It is truly amazing how much of a speed bust you get just by rearranging the AND conditions.
hmmmm.. a part of me says to rewrite all of my scripts now but I think I wait till after I finish this script that is due tommorrow..
PS.. ok ok you got me... I do not have a girlfriend... but i am trying to get one I swear