Tuesday, July 12, 2011

Database Index, a little action leads to better performance

When you run a query and it happens to run very slow against a certain table, you start thinking that your fellow who created the query must have created a buggy query. Later, when you scan your database tables, you then find that the table has no index at all. Take a deep breath and start creating indexes on columns which are accessed a lot in queries, for example, primary keys, foreign keys, and columns that are used often in the where and order clauses. After that, don't forget to say sorry for blaming your fellow and start complaining your DBA :D.

0 comments:

 

©2009 Stay the Same | by TNB