Expression based index

From: shrish purohit <shrishpurohit(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Amit Gupta <amit(dot)pc(dot)gupta(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Expression based index
Date: 2009-04-03 11:51:07
Message-ID: 69b219810904030451p8b797ah7d6aaa4bb0c756ca@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

HI All,

I had gone through advantages of visibilitymap along with discussion on
thick index. I have a question.
when we have information about visibility of the data, does it make sense to
propagate values of expression stored in index through various slots of
execution tree?
It would be helpful when index is created on immutable function or
expression.

I am adding additional columns in the heap tuple returned by index with the
expression values stored in the index. For index_only_scan while projecting
the values we will treat expression as normal column. It is simple for
queries with single table. But, when we have joins, we will need to modify
plan to treat expression as normal column. This will involve modifying plan,
intermediate slots. Modification in the plan need to be performed after
finalizing plan, as we will be able to identify whether we can treat the
expression as value only then.

Can there be any other alternative?

Thanks,
Shrish

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-04-03 12:03:33 Re: a few crazy ideas about hash joins
Previous Message Nikhil Sontakke 2009-04-03 09:45:22 Re: Bug of ALTER TABLE DROP CONSTRAINT