Basic Tips for SQL

by Antonio M
The article is about the basics of writing code in SQL and gives tips on how to write code efficiently to enhance the performance of Database Management Systems. About 75% of performance can be the result of poor SQL statements within an applications code. To specifically avoid such errors the first thing a programmer should do is to always give the exact columns that are needed using the SQL SELECT statement. There is no need to get columns that are not being used and take up processing time that can be used for the DBMS itself.
The author also advices, when filtering data, to use the WHERE statement rather than having the SQL statment dump all your data into the DBMS and then filtering it. Another good tip offered, is refraining from querrying data that is already known. The last advice the author gives is to always keep a database up to date which will maintain its overall performance.

This article is related to our lecture topic because it gives a programmer basic performance adivce when coding in SQL. I think the advice given by this author will be very helpful to me not only when doing projects in class but also in real world applications.

Being a programmer/developer at Metropolitain Water District I have been involved in a project that involves designing and developing a DBMS using Microsoft Access. This application queries data from a data warehouse and retrieves data that will be submitted in a report for further analysis. Aside from on-the-job training and simple trial and error I have never had any formal training in SQL. This article gave me good tips and ideas that I had yet to even think about. I look forward to learning more about SQL and Database Design and Development this quarter.


Mullins, C. (2010). Sql Performance Basics. Database Trends and Applications V. 24 No. 4 (December 2010) P. 29, 24(4), 29.


4 thoughts on “Basic Tips for SQL”

  1. Antonio, good job on being the first one to post here this quarter! I have a couple of suggestions: can you format the post content in the blog’s editor so that the paragraphs display properly? Also, at the bottom of the post, can you change the “CITE” to “Reference”?

  2. I agree that SQL will make databases a lot easier. Many of what the author gives as tips are very helpful. I’ve dealt a little bit with SQL before and because there are various ways to create filters the possibilities could be endless. I expect this class to be very enjoyable and knowledgeable because using SQL and ERWIN is very common in real world applications and jobs.

  3. As with all coding it is important to ensure that all statements are correct. In my Java class last quarter, I almost went crazy trying to figure out what was wrong with my program. Towards the end, I found out it was because I typed in one line of code incorrectly. Always remember to double check the codes! I’ve never worked with database before, but I’m looking forward to learn about them in this class 🙂

  4. SQL has been a language I have been wanting to get familiar with for awhile, this article is definitely going to be of use. Exactly what Penny said, there was always a simple fix for the programs but you could never find it unless you really concentrated on your code and the syntax.

    You mentioned you work at the Metropolitan Water District, what other work do you do there? I saw you said that you are using Access to develop DBMS applications, I was more than interested with our previous work in CIS310. Just curious!

Comments are closed.