This document discusses query optimization techniques, specifically heuristic query optimization. It outlines that query optimization aims to choose the most efficient execution strategy to minimize resource usage. Typical optimization steps include parsing, optimization, evaluation, and execution. Heuristic optimization uses logical and physical optimization techniques like rearranging select operations to be more restrictive first, converting cartesian products followed by selection into joins, and moving project operations down the query tree. An example is provided of translating an SQL query into a relational algebra query tree and applying heuristic optimization techniques like join reordering to produce a more efficient query execution plan. Cost-based optimization also considers factors like access costs, storage costs, and communication costs to determine the lowest cost plan.