do's and don'ts for writing mysql queries

Posted by nik on Stack Overflow See other posts from Stack Overflow or by nik
Published on 2010-04-23T07:49:42Z Indexed on 2010/04/23 7:53 UTC
Read the original article Hit count: 301

One thing I always wonder while writing query is that am I writing most optimized query or not? I know certain things like:

1) using SELECT field1, filed2 instead of SELECT *

2) Giving proper indexes to the tables

but I am sure there are more things that should be kept in mind for writing queries, since most of the database can only grow more and optimal query will help gr8 in execution time, Can u share some tips and tricks on writing queries?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about queries