Skip to content
No results
We use cookies to ensure that we give you the best experience on our website.

# Oracle SQL Query rewrite

This article includes a list of Oracle SQL rewrite rules to improve sql performance, with the help of General SQL Parser, those SQL query rewrite can be done automatically.

1. (NOT) IN sub-query to (NOT) EXISTS sub-query

2. (NOT) EXISTS sub-query to (NOT) IN sub-query

3. Separate outer joined inline view using UNION ALL or add hint for the inline view

4. IN clause to UNION ALL statement

5. OR clause to UNION ALL statement

6. NVL function to UNION ALL statement

7. Re-write suppressed joined columns in the WHERE clause

8. VIEW expansion

9. NOT EXISTS to NOT IN hash anti-join

10. Make columns suppressed using RTRIM function or ‘+0’

11. Add hint to the statement

12. Co-related sub-query to inline View

Download this demo: C# version