Home » RDBMS Server » Performance Tuning » Help Required in Tunning
Help Required in Tunning [message #217940] Tue, 06 February 2007 02:58 Go to next message
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
Re: Help Required in Tunning [message #217953 is a reply to message #217940] Tue, 06 February 2007 03:38 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Use Sample
By
Vamsi
Previous Topic: Full table scan
Next Topic: How to push Hash Anti join without HINT or code modification ?
Goto Forum:
  


Current Time: Sat Nov 23 10:54:56 CST 2024