Apex Report Query Statements

I believe this to be a bug in the Apex installation. If you have a report query which has a number of statements, the order of execution of these statements can not be guaranteed if an application is migrated to another instance. The fix / work around is quite simple, create an index on the flows table, this effectively prompts the optimizer to use the index thus guaranteeing the correct order.

Table WWV_FLOW_SHARED_QRY_SQL_STMTS

Columns SHARED_QUERY_ID, ID