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: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 16 Oct 2005 16:04:15 +0200
Message-ID: <43525dde$0$4334$626a54ce@news.free.fr>

"AnySQL (d.c.b.a)" <anysql_at_gmail.com> a écrit dans le message de news: 1129383798.073031.13550_at_g49g2000cwa.googlegroups.com...
| According to the extent allocation order.
|
| http://www.anysql.net/en/
|

This is not correct.

SQL> desc test
 Name Null? Type

No index or constraint on this table.

SQL> begin
  2 for i in reverse 0..25 loop
  3 insert into test values (i, chr(ascii('A')+i));   4 end loop;
  5 end;
  6 /

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

SQL> select extent_id, file_id, block_id, blocks from dba_extents   2 where owner=user and segment_name='TEST';  EXTENT_ID FILE_ID BLOCK_ID BLOCKS ---------- ---------- ---------- ----------

         0          7          7          5
         1          7         12          5
         2          6          2          5
         3          6         12          5
         4          7          2          5
         5          6          7          5

6 rows selected.

SQL> select id,

  2         dbms_rowid.rowid_relative_fno(rowid) file#,
  3         dbms_rowid.rowid_block_number(rowid) block#,
  4         dbms_rowid.rowid_row_number(rowid) row#
  5 from test
  6 /

        ID FILE# BLOCK# ROW# ---------- ---------- ---------- ----------

        16          6          2          0          -- Extent 2
        15          6          3          0          ----
        14          6          4          0          ----
        13          6          5          0          ----
        12          6          6          0          ----
         1          6          7          0          -- Extent 5
         0          6          8          0          ----
        11          6         12          0          -- Extent 3
        10          6         13          0          ----
         9          6         14          0          ----
         8          6         15          0          ----
         6          7          2          0          -- Extent 4
         5          7          3          0          ----
         4          7          4          0          ----
         3          7          5          0          ----
         2          7          6          0          ----
        25          7          8          0          -- Extent 0
        24          7          9          0          ----
        23          7         10          0          ----
        22          7         11          0          ----
        21          7         12          0          -- Extent 1
        20          7         13          0          ----
        19          7         14          0          ----
        18          7         15          0          ----
        17          7         16          0          ----
         7          6         16          0          -- Extent 3

26 rows selected.

Regards
Michel Cadot Received on Sun Oct 16 2005 - 09:04:15 CDT

Original text of this message

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