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


Reply via email to