Re: Ad Hoc Indexes

Поиск
Список
Период
Сортировка
От Hans-Juergen Schoenig
Тема Re: Ad Hoc Indexes
Дата
Msg-id 16AB0F44-B51C-4CB7-9748-EBFDB416847A@cybertec.at
обсуждение исходный текст
Ответ на Re: Ad Hoc Indexes  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Ad Hoc Indexes
Список pgsql-hackers

On Feb 18, 2008, at 9:09 PM, Peter Eisentraut wrote:

Justin wrote:
Now for my question It does not appear PostgreSQL does not have an Ad
Hoc Indexes ability where the Query planner will create an in memory
index based on the Select, Update, Insert or Delete commands.

How is that supposed to work?  In order to create an index you would need to 
visit all the rows in the table.  If you do that, you could just as well 
answer the query off a sequential scan.



this is not quite true.
this kind of indexing makes sense if you visit the same data over and over again. WITH-queries would be an example for that and self joins could benefit from the this feature too.

the question however is: why not create "normal indexes" straight away?
i am not sure if the benefit of ad-hoc indexes justify additional complexity in the code ...

best regards,

hans


--
Cybertec Schönig & Schönig GmbH
PostgreSQL Solutions and Support
Gröhrmühlgasse 26, 2700 Wiener Neustadt
Tel: +43/1/205 10 35 / 340
www.postgresql.at, www.cybertec.at


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: IDENTITY/GENERATED patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Ad Hoc Indexes