by Andrew H
I read an article by Craig Mullins called, SQL Performance Basics. I chose the article because I was searching for SQL statement articles and it was closer to the top and the fact that it has to do with performance caught my eye. The article states that as much as 75% of poor relational performance is caused by poorly coded SQL. The article goes through a few different ways to help increase performance as well as how to avoid coding SQL poorly. As the author says with proper training and experience coding it in an efficient way is not hard but can still be an elusive task for many coders. Some of his simple tips to create an efficient database are, to think relationally, code join instead of implementing cursors for every table that is going to be read, always provide only the exact columns that you need to retrieve, and filter data using a where clause. To always provide the exact columns that you need the author says to use a SELECT statement in SQL but don’t have use SELECT* as this is a bad practice for programs because that statement will retrieve all columns from the tables being accessed. The WHERE clause is important because you should filter what data you need out before bringing it in to your program, as this will greatly increase the speed of your application.
I thought this article was interesting and important because as we learn how to write SQL statements we need to figure out what will increase or decrease performance so that we do not make mistakes and cause glitches in our databases. Both the SELECT and WHERE statements are important to us because I’m sure we all want to create a database that does not pull excess data that is not need and get slowed down by it, so I will make sure that I do not use the generic SELECT statements whenever possible.
Mullins, C. (Dec 2010). SQL Performance Basics. Database Trends and Applications, 24.