SQL Optimizer and ANSI SQL

Follow / 5 Jan 2011 at 11:22pm
Does the SQL Optimizer favor queries written in "plain" (Oracle) SQL over those written in ANSI SQL?  (ie; are you less likely to get alternate sql statements if your original sql is written in ANSI SQL?)

Replies

  • Follow / 6 Jan 2011 at 4:42am
    Hi,

    SQL Optimizer doesn't favor one over the other. We have a parser to breakdown your SQL statement into semantic elements from which we can understand the meaning of your joins and conditions. And also from that semantic elements we provide the different alternative SQL statements that have the same meaning. So it doesn't matter if your SQL is using ANSI JOIN syntax or not.

    In the Options page, you can actually control if SQL Optimizer should provide an alternatives using the ANSI syntax. You can use it to tell SQL Optimizer what syntax you prefer.

    Regards,
    Alex