Showing posts with the label Performance

Five top SQL Query Performance Tuning Tips

SQL query runs faster when you write it in a specific method. You can say it as tuning. There are five tuning tips: List of Performance Tuning Tips use index columns, use group by, avoid duplicate column in SELECT & Where, use Left Joins use a co-related subquery. Five top SQL Query Performance Tuning Tips SQL Performance Tuning Tip: 01 Use  indexes in the where clause of SQL . Let me elaborate more on that. Be sure the columns that you are using in the WHERE clause should be already part of the Index columns of that database Table. An example SQL Query: SELECT *  FROM emp_sal_nonppi WHERE dob <= 2017-08-01; SQL Performance Tuning Tip: 02 Use GROUP BY . Some people use a  DISTINCT clause to eliminate duplicates . You can achieve this by GROUP BY. An example SQL Query: SELECT E.empno, E.lastname FROM emp E,emp_projact EP WHERE E.empno = EP.empno GROUP BY E.empno, E.lastname; SQL Performance Tuning Tip: 03 Avoid using duplicates in the Query. Some people use the same col