SQL is declarative, meaning the same query can be written in multiple syntactically different ways that produce the same result but generate vastly different execution plans. This makes SQL optimization complex and critical for performance. The optimizer must choose the best execution plan from semantically equivalent alternatives.