Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: question on retrieving rows
> Hi, > sorry to confuse you. newbie here :P > like u said, lets say 1 or more rows are on a particular block, and > off course oracle should know the block location for these rows before > it retrieve them. My question is from where does oracle get this > information that these rows are resided on that block? (and how if the > table is not indexed?)
Without indexes, Oracle doesn't know where each row of a table is. But what it knows is where the blocks are that the data of a table resides on. You can find out about these locations if you query DBA_EXTENTS and DBA_DATA_FILES:
select file_name, s.block_id, s.blocks from dba_data_files f, dba_extents s where f.file_id = s.file_id and s.segment_name = 'TABLE_NAME' and s.owner= 'USER_NAME' Each row returned gives you the information about the location of a chunk of blocks in a file for a table. block_id is the starting block, and blocks is the number of blocks.
Now, if you query a table for some values and there is no index on the table, Oracle has to retrieve all blocks and compare the values in the where condition with the actual values on the disk.
hth
Rene Nyffenegger
> > > "Jim Kennedy" <kennedy-down_with_spammers_at_attbi.com> wrote in message news:<tkTca.96752$eG2.13965_at_sccrnsc03>...
-- Projektleitung und Entwicklung in Oracle/C++/C# Projekten http://www.adp-gmbh.ch/cv.htmlReceived on Sun Mar 16 2003 - 08:34:02 CST