Re: Postgres 9.0 has a bias against indexes

Поиск
Список
Период
Сортировка
От Igor Neyman
Тема Re: Postgres 9.0 has a bias against indexes
Дата
Msg-id F4C27E77F7A33E4CA98C19A9DC6722A2070C25C8@EXCHANGE.corp.perceptron.com
обсуждение исходный текст
Ответ на Re: Postgres 9.0 has a bias against indexes  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: Postgres 9.0 has a bias against indexes
Список pgsql-performance

> -----Original Message-----
> From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
> Sent: Thursday, January 27, 2011 4:25 PM
> To: Igor Neyman
> Cc: Mladen Gogala; Tom Lane; David Wilson; Kenneth Marshall;
> pgsql-performance@postgresql.org
> Subject: Re: [PERFORM] Postgres 9.0 has a bias against indexes
>
> On Thu, Jan 27, 2011 at 2:18 PM, Igor Neyman
> <ineyman@perceptron.com> wrote:
> >
> >> -----Original Message-----
> >> From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
> >> Sent: Thursday, January 27, 2011 4:16 PM
> >> To: Igor Neyman
> >> Cc: Mladen Gogala; Tom Lane; David Wilson; Kenneth Marshall;
> >> pgsql-performance@postgresql.org
> >> Subject: Re: [PERFORM] Postgres 9.0 has a bias against indexes
> >>
> >> On Thu, Jan 27, 2011 at 2:12 PM, Igor Neyman
> <ineyman@perceptron.com>
> >> wrote:
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
> >> >> Sent: Thursday, January 27, 2011 3:59 PM
> >> >> To: Mladen Gogala
> >> >> Cc: Igor Neyman; Tom Lane; David Wilson; Kenneth Marshall;
> >> >> pgsql-performance@postgresql.org
> >> >> Subject: Re: [PERFORM] Postgres 9.0 has a bias against indexes
> >> >>
> >> >> On Thu, Jan 27, 2011 at 1:44 PM, Mladen Gogala
> >> >> <mladen.gogala@vmsinfo.com> wrote:
> >> >> > On 1/27/2011 3:37 PM, Scott Marlowe wrote:
> >> >> >>
> >> >> >> On Thu, Jan 27, 2011 at 1:31 PM, Mladen Gogala
> >> >> >> <mladen.gogala@vmsinfo.com>  wrote:
> >> >> >>>
> >> >> >>> There is INDEX UNIQUE SCAN PK_EMP.  Oracle will use
> an index.
> >> >> >>
> >> >> >> That's because Oracle has covering indexes.
> >> >> >>
> >> >> > I am not sure what you mean by "covering indexes" but I
> >> >> hope that for
> >> >> > the larger table I have in mind,  indexes will be used.
> >> >> For a small
> >> >> > table like
> >> >>
> >> >> In Oracle you can hit JUST the index to get the data
> you need (and
> >> >> maybe rollback logs, which are generally pretty small)
> >> >>
> >> >> In Pgsql, once you hit the index you must then hit the
> actual data
> >> >> store to get the right version of your tuple.  So, index
> >> access in pg
> >> >> is more expensive than in Oracle.  However, updates are cheaper.
> >> >> Always a trade off
> >> >>
> >> >>
> >> >
> >> > Scott,
> >> > What you describe here isn't about "covering indexes" -
> >> it's about different ways implementing MVCC in Oracle and PG.
> >>
> >> It is about covering indexes AND it's about the difference in how
> >> MVCC is implemented in both databases.
> >>
> >>
> >
> > Well, Mladen's query doesn't involve covering indexes.
>
> On Oracle?  Then how can it get the values it needs without
> having to hit the data store?
>
>

It doesn't.
It does "INDEX UNIQUE SCAN" and then "TABLE ACCESS BY INDEX ROWID".

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: Postgres 9.0 has a bias against indexes
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Postgres 9.0 has a bias against indexes