Does Oracle store values in indices? - Mailing list pgsql-hackers

From Denis Perchine
Subject Does Oracle store values in indices?
Date
Msg-id 01012322205400.09350@dyp.perchine.com
Whole thread Raw
Responses Re: Does Oracle store values in indices?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,

just small question.
I just realized that it seems that Oracle stores indexed values in the index 
itself. This mean that it is not necessary to access table when you need to 
get only indexed values.

iso table has an index for vin field. Here is an output for different queries.

SQL> explain plan for select * from iso where vin='dfgdfgdhf';
Explained.
SQL> @?/rdbms/admin/utlxpls
Plan Table
--------------------------------------------------------------------------------
| Operation                 |  Name    |  Rows | Bytes|  Cost  | Pstart| 
Pstop |
--------------------------------------------------------------------------------
| SELECT STATEMENT          |          |     6 |  402 |      8 |       |      |
|  TABLE ACCESS BY INDEX ROW|ISO       |     6 |  402 |      8 |       |      |
|   INDEX RANGE SCAN        |IX_ISO_VI |     6 |      |      3 |       |      |
--------------------------------------------------------------------------------
6 rows selected.
SQL> explain plan for select vin from iso where vin='dfgdfgdhf';
Explained.
SQL> @?/rdbms/admin/utlxpls
Plan Table
--------------------------------------------------------------------------------
| Operation                 |  Name    |  Rows | Bytes|  Cost  | Pstart| 
Pstop |
--------------------------------------------------------------------------------
| SELECT STATEMENT          |          |     6 |   42 |      3 |       |      |
|  INDEX RANGE SCAN         |IX_ISO_VI |     6 |   42 |      3 |       |      |
--------------------------------------------------------------------------------


I think this question already was raised here, but... Why PostgreSQL does not 
do this? What are the pros, and contros?

-- 
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp@perchine.com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: question
Next
From: Ned Lilly
Date:
Subject: Re: question