Basic Tips for SQL{4}


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.

Reference:

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