Help Required in Tunning [message #217940] |
Tue, 06 February 2007 02:58 |
oracle_guy
Messages: 13 Registered: February 2007
|
Junior Member |
|
|
Hi,
I have a query. I need to tune that. I mean i am not aware whether this is a perfect one or not.
The query is
Select *
from (select * from Table A order by dbms_random.random)
where rownum<=(select round(.05 * count(*)) from Table A);
Table A has approximately 10 million rows. Now this query is select 5% of data from Table A in a random manner.
I will be using this query in PL/SQL Procedure to insert data into Table B.
Is the query perfect or doest it require tuning. I think this query will perform a full table scan on Table A.
I am using Oracle 10gR2
|
|
|
|