Does Oracle store values in indices?

From: Denis Perchine <dyp(at)perchine(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Does Oracle store values in indices?
Date: 2001-01-23 16:20:54
Message-ID: 01012322205400.09350@dyp.perchine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)perchine(dot)com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Max Rudensky 2001-01-23 16:25:30 Re: [GENERAL] MySQL -> Postgres dump converter
Previous Message Tom Lane 2001-01-23 16:12:23 Re: question