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
Messages: 13
Registered: February 2007
Junior Member

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: 2108
Registered: October 2003
Location: Hyderabad, India
Senior Member
Use Sample
Previous Topic: data guard query
Next Topic: SQL with high consistent gets
Goto Forum:

Current Time: Sun Aug 20 03:10:12 CDT 2017

Total time taken to generate the page: 0.04373 seconds