Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

        
 
   Oracle Tips by Burleson

Oracle10g Sample Table Scans

A sample table scan retrieves a random sample of data. It can be from a simple table or a complex SELECT statement such as a statement involving joins and views.

To perform a sample table scan when sampling by rows with the SAMPLE clause, Oracle reads a specified percentage of rows in the table. To perform a sample table scan when sampling by blocks with the SAMPLE BLOCK clause, Oracle reads a specified percentage of table blocks.

Examples:

The following statements uses a sample block and sample rows scan on the policyrec table. (Note that there are 50,000 rows in this table.) The first two statements show the sample block scans and the last one shows a sample row scan.

SQL> select count(*) from policyrec sample block(20) ;

 

  COUNT(*)

----------

     12268

 

SQL> select count(*) from policyrec sample block(5) ;

 

  COUNT(*)

----------

      2192

 

SQL> select POL_NO, SALES_ID, SUM_ASSURED, PREMIUM

  2  from policyrec  sample (0.02) ;

 

    POL_NO   SALES_ID SUM_ASSURED    PREMIUM   

---------- ---------- ----------- ---------- --

      2895         10        2525          2   

      3176         10        2525          2   

      9228         10        2525          2   

     11294         11        2535          4   

     19846         11        2535          4   

     25547         12        2545          6   

     29583         12        2545          6   

     40042         13        2555          8   

     47331         14        2565         10   

     45283         14        2565         10   

 

10 rows selected.


Get the complete Oracle10g story:

The above text is an excerpt from "Oracle Database 10g New Features: Oracle10g Reference for Advanced Tuning and Administration", by Rampant TechPress.  Written by top Oracle experts, this book has a complete online code deport with ready to use scripts. 

To get the code instantly, click here:

http://www.rampant-books.com/book_2003_2_oracle10g.htm


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.