Subscriber Count

    457

Subscribe2

Pages

Rows in Sort order without order by clause?

I have been asked by one of colleague (Vasu) about a weird issue, that the query returns rows in sort order  in one database not in the other database.

Without having much hassle, by running dbms_xplan.display_cursor('sql_id',NULL,'ADVANCED) mode tell's us the optimizer parameter "_gby_hash_aggregation_enabled" is having different values in each database. Which is mean to perform the sort group by or hash group by operation.

To simulate the issue, I just did the following, a quick check on v$session row_wait_obj# column with parameter false/true.

The result show rows in non sorted for true, (means performed a hash group by operation) where in with false the rows are in sorted order (sort group by has been performed)

 

-Thanks

Suresh

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>