fardeen memon <frank69in@yahoo.com> writes:
> What is it that i am doing wrong?
I think the forced coercion to date type in the view case is preventing
the planner from making a good guess about the selectivity of the
condition on tra_date. It has stats about tra_date's distribution,
but none about the distribution of "tra_date::date".
regards, tom lane