Query Optimization Techniques

Below Query Optimization Techniques should be taken care of to optimize SQL queries:

Use Index
Aggregate table – Pre-populating tables at higher levels so less amount of data need to be parsed.
Vertical partitioning
Horizontal Partitioning
Server Tuning
Move Queries to stored procedures
Remove unneeded views
Only query what you really need
Sort only when required
You should do […]

read more