Does Oracle store values in indices?

Поиск
Список
Период
Сортировка
От Denis Perchine
Тема Does Oracle store values in indices?
Дата
Msg-id 01012322205400.09350@dyp.perchine.com
обсуждение исходный текст
Ответы Re: Does Oracle store values in indices?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: question
Следующее
От: Ned Lilly
Дата:
Сообщение: Re: question