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: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Use Sample
Previous Topic: Full table scan
Next Topic: How to push Hash Anti join without HINT or code modification ?
Goto Forum:

Current Time: Sat Oct 22 09:18:33 CDT 2016

Total time taken to generate the page: 0.09280 seconds