A Simple ExampleSQL Tuning, the Traditional WayCode DustingSQL Tuning, RevisitedRefactoring, First StandpointRefactoring, Second StandpointComparison and CommentsChoosing Among Various ApproachesAssessing Possible GainsFinding Out What the Database Is DoingQuerying dynamic viewsDumping statements to a trace fileExploiting trace filesAnalyzing Collected Material