Re: Index not being used in MAX function (7.2.3)

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Index not being used in MAX function (7.2.3)
Дата
Msg-id 20030613223649.GW40542@flake.decibel.org
обсуждение исходный текст
Ответ на Re: Index not being used in MAX function (7.2.3)  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: Index not being used in MAX function (7.2.3)  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
On Fri, Jun 13, 2003 at 03:58:13PM -0500, Bruno Wolff III wrote:
> > You can use multiple indexes per query plan node? IE: if you have
> > indexes on a and b, you can use both indexes when you do WHERE a=blah
> > and b=foo? That's what I was reffering to...
>
> I think what you are describing doesn't make much sense. On any scan
> you are only going to using one index (possibly over several columns).

I believe MSSQL and Oracle support it; they scan the indexes then grab
the appropriate set of matching tuple addresses. The advantage you get
from this is you can get close to multi-key index performance without
using multi-key indexes. This is useful when you need to do lookups on
two different fields in a table, and also need to do lookups on both
fields. IE:

select ... where a=foo;
select ... where b=bar;
select ... where a=blah and b=baz;

I was strictly looking to the future when pgsql migth eventually support
this. :)
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] SAP and MySQL ... [and Benchmark]
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: full featured alter table?