Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: doubt on table scan

Re: doubt on table scan

From: AnySQL (d.c.b.a) <anysql_at_gmail.com>
Date: 18 Oct 2005 20:39:36 -0700
Message-ID: <1129693176.079123.98000@z14g2000cwz.googlegroups.com>


I create an index on col1, and make some block in cache first, the perform the query like Michel, but cannot reproduce that result. You should check you parallel default setting.

SQL> create index idx_scantest_col1 on scantest(col1) tablespace scantest;

Index created.

SQL> alter tablespace scantest offline;

Tablespace altered.

SQL> alter tablespace scantest online;

Tablespace altered.

SQL> select col1 from scantest where col1 = 85;

      COL1


        85

SQL> select col1 from scantest where col1 = 99   2 ;

      COL1


        99

SQL> select col1 from scantest where col1 = 12;

      COL1


        12

SQL> select col1,

           dbms_rowid.rowid_relative_fno(rowid) file#,
           dbms_rowid.rowid_block_number(rowid) block#,
           dbms_rowid.rowid_row_number(rowid) row#
   from SCANTEST where rownum < 100 2 3 4 5   6 /

      COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------

         1         14         34          0
         2         14         34          1
         3         14         34          2
         4         14         35          0
         5         14         35          1
         6         14         35          2
         7         14         36          0
         8         14         36          1
         9         14         36          2
        10         14         37          0
        11         14         37          1

      COL1      FILE#     BLOCK#       ROW#

---------- ---------- ---------- ----------
12 14 37 2 13 14 38 0 14 14 38 1 15 14 38 2 16 14 39 0 17 14 39 1 18 14 39 2 19 14 40 0 20 14 40 1 21 14 40 2 22 13 9 0 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
23 13 9 1 24 13 9 2 25 13 10 0 26 13 10 1 27 13 10 2 28 13 11 0 29 13 11 1 30 13 11 2 31 13 12 0 32 13 12 1 33 13 12 2 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
34 13 13 0 35 13 13 1 36 13 13 2 37 13 14 0 38 13 14 1 39 13 14 2 40 13 15 0 41 13 15 1 42 13 15 2 43 13 16 0 44 13 16 1 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
45 13 16 2 46 14 9 0 47 14 9 1 48 14 9 2 49 14 10 0 50 14 10 1 51 14 10 2 52 14 11 0 53 14 11 1 54 14 11 2 55 14 12 0 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
56 14 12 1 57 14 12 2 58 14 13 0 59 14 13 1 60 14 13 2 61 14 14 0 62 14 14 1 63 14 14 2 64 14 15 0 65 14 15 1 66 14 15 2 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
67 14 16 0 68 14 16 1 69 14 16 2 70 13 17 0 71 13 17 1 72 13 17 2 73 13 18 0 74 13 18 1 75 13 18 2 76 13 19 0 77 13 19 1 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
78 13 19 2 79 13 20 0 80 13 20 1 81 13 20 2 82 13 21 0 83 13 21 1 84 13 21 2 85 13 22 0 86 13 22 1 87 13 22 2 88 13 23 0 COL1 FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
89 13 23 1 90 13 23 2 91 13 24 0 92 13 24 1 93 13 24 2 94 14 41 0 95 14 41 1 96 14 41 2 97 14 42 0 98 14 42 1 99 14 42 2

99 rows selected. Received on Tue Oct 18 2005 - 22:39:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US