Search Postgresql Archives

Re: MVCC and index-only read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonah H. Harris wrote on 18.11.2008 20:15:
On Tue, Nov 18, 2008 at 2:02 PM, Scara Maccai <m_lists@xxxxxxxx> wrote:
SELECT A FROM myTAB where A <10000

only uses the index (if there's an index defined for A) in Oracle.

Well, not exactly.  That's called a "covered" index because the query
could be satisfied directly from the index (the attribute is covered
by the index).  Oracle sometimes satisfies it with an index fast full
scan, but not always; it depends on the cost of other access methods
and/or what Oracle believes is currently in cache.

If all the columns from the select list are available in the index, then Oracle will always prefer the index scan over a table scan (at least I have never seen something else). Even for a SELECT that returns all rows of the table.

They are taking this concept even further with index organized tables, where no real "table data" exists, everything is stored in the index (quited nice for e.g. link tables that only consist of two or three integer columns)


Thomas


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux