SAMPLE BLOCK in select
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: SAMPLE BLOCK in select

  1. #1
    Join Date
    Nov 2000
    Posts
    15

    SAMPLE BLOCK in select

    What is the implication of the SAMPLE BLOCK(1) in the following query?

    SELECT COUNT(*) from TABLE_A SAMPLE BLOCK(1)

    I assumed that this would return all of the rows in the first block of the TABLE_A data segment, but the number of rows that is being returned is over 100,000 and with a 16K block size I can hardly believe that there are that many rows in one block.
    Michael Auer
    Oracle DBA/Developer
    Oracle8i OCP

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    if I rememebr right it tells how more or less how many rows are there, it estimates number of rows per block then multiply by the total number of blocks

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    ops

    this is the definition

    sample_clause
    The sample_clause lets you instruct Oracle to select from a random sample of rows from the table, rather than from the entire table.

    BLOCK
    BLOCK instructs Oracle to perform random block sampling instead of random row sampling.

    See Also: Oracle8i Concepts for a discussion of the difference


    sample_percent
    sample_percent is a number specifying the percentage of the total row or block count to be included in the sample. The value must be in the range .000001 to (but not including) 100.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width