•A sample table scan retrieves a random sample of data from a simple table or a complex SELECT statement, such as a statement involving joins and views.
•This access path is used when a statement’s FROM clause includes the SAMPLE clause or the SAMPLE BLOCK clause.
•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.
Example:
——————-
SQL> select * from test_skip_scan sample(.2);
20 rows selected.
Execution Plan
———————————————————-
Plan hash value: 571935661
————————————————————————————–
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
————————————————————————————–
| 0 | SELECT STATEMENT | | 20 | 180 | 6 (0)| 00:00:01 |
| 1 | TABLE ACCESS SAMPLE| TEST_SKIP_SCAN | 20 | 180 | 6 (0)| 00:00:01 |
Expert are always welcome for their valuable comment or suggestion for the above post.
Related Post:
https://samadhandba.wordpress.com/2011/01/04/oversize-of-datatype-varchar2-causes-performance-issue/
https://samadhandba.wordpress.com/2011/02/16/what-and-when-index-scans-is-used/
https://samadhandba.wordpress.com/2011/02/14/sample-table-scans-in-oracle/
https://samadhandba.wordpress.com/2011/02/14/when-you-would-make-index-and-when-not/
https://samadhandba.wordpress.com/2011/02/14/optimize-data-access-path-in-oracle-2/
https://samadhandba.wordpress.com/2011/02/13/troubleshoot-unusable-index-in-oracle/
https://samadhandba.wordpress.com/2011/02/13/the-possible-causes-for-excessive-undo-generation-2/
https://samadhandba.wordpress.com/2011/02/13/three-basic-steps-of-sql-tuning/
https://samadhandba.wordpress.com/2011/02/13/goals-for-tuning-2/