IF Exits vs Count(*) – just when you thought it was safe ….
Here’s a couple more of the topics I covered in my presentation “ Gone in 60 Nano seconds “. It’s tricky sometimes formatting posts to display correctly on the blog so for most of the material from the presentation I’m going to link to the pages on my web site.
As I’m going to put all the topics there the previous post about adding columns is included. I’ve put the example of count(*) seriously out performing an if exists and I’ve expanded upon the calculated columns topic. In the presentation I talked about how I found out I had this issue, well I’ve put in the performance graphs which first alerted me and tried best as I can remember what else I said.
The main gist of the presentation was to talk about performance without an index in sight – as I remarked there’s only so many indexes you can add to a database and at some stage you have to examine the options of changing how a query is written to gain performance.
Here’s the links to the next two topics and the previous.
http://www.grumpyolddba.co.uk/gonein60ns/IfExistsvsCount.htm
http://www.grumpyolddba.co.uk/gonein60ns/calculatedcolumns.htm
http://www.grumpyolddba.co.uk/gonein60ns/NoMoreColumns.htm
As I talked a lot about the concepts of partitioning data ( not just partitioned tables ) I hope to put all I said into one or two documents by the end of the week, there are about 30 or 40 pages in total so it takes a little while to format them correctly into html – please bear with me.