Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Performance issue using dbms_random.value

helena.m.silvaDec 11 2013 — edited Dec 11 2013

Hi there,

I need some help with the following query. Is there any other way to get the same result?

This is taking much time (select... order by is getting 1Million rows...)

I just want to get a random value (any value from table with those conditions).

SELECT REF FROM

(SELECT REF

    FROM REF_MULT

  WHERE ENT=199 AND DT IS NULL

  ORDER BY DBMS_RANDOM.VALUE)

WHERE ROWNUM=1

Thanks in advance for any answer.

Best Regards,

Helena

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2014
Added on Dec 11 2013
5 comments
1,342 views