Rewriting Queries
SELECT *
FROM Customers
WHERE state = 'New York' AND city = 'New York';
is equivalent to
SELECT *
FROM Customers
WHERE state = 'New York'
AND city IN (SELECT city
FROM Customers
WHERE city = 'New York');
Choosing the right index
CREATE INDEX index_name
ON table_name (column1, column2, ...);
Fine-tuning Database Design
Changes such as the separation of specific data to different tables (Normalization), combining redundant data (Denormalization), or changing the way how tables are linked (Optimized Join Operations), can be implemented to optimize the schema.
Use of SQL Clauses wisely
SELECT column1, column2
FROM table_name
WHERE condition
LIMIT 10;