This technical report discusses the optimization of SQL queries, specifically focusing on the use of EXISTS and IN clauses. It outlines the performance implications of using these constructs in SQL queries, particularly in the context of a database with a large number of records. The report presents examples of SQL queries that utilize EXISTS and IN, comparing their execution plans to highlight differences in performance. It explains how rewriting queries using JOINs can lead to improved efficiency, demonstrating this with specific SQL code examples. The report also addresses the concept of subquery unnesting, detailing how this transformation can enhance query performance by allowing the optimizer to consider additional access paths and join methods. Furthermore, it emphasizes the importance of understanding the underlying execution plans generated by the database optimizer and how different query structures can significantly impact performance. Overall, the report serves as a practical guide for database professionals seeking to enhance the efficiency of their SQL queries.