Popular Posts

Saturday, January 1, 2022

Performance Tuning Tips in Oracle

 TIPS FOR PERFORMANCE TUNING 


1. try to Analyze cost of the query using explain plan






2. using explain plan try to find out the cost of query and find out which join is taking more cost , that is taking more time , so try to rewrite that join or expression.

3. Try to use exists () , instead of in () / like expression.

4. try to Add indexes on the id columns

5. If creating indexes doesnot work then try creating functional index which is more of related to a expression of a query join

6. try to use partition by clause.

7. Try to avoid the full table scans.



SQL to Get dates missing in a table for given date range

 WITH all_dates AS (     SELECT DATE '2025-01-01' + LEVEL - 1 AS dt     FROM dual     CONNECT BY LEVEL <= (DATE '2026-01-01...