Stephan,
> We had a discussion recently on -general about this. Right now the
> planner won't push the conditions down into the arms of the union because
> noone's been sure under what conditions the optimization is safe.
So, if performance is horrible with the view, I should use a dummy table to
hold the Unioned data and index that instead?
I can understand the difficultyof optimization. However, the example I
supplied is the simplest of unions, and the two Seq Scans do seem to be
proceeding against each table seperately. I think for very simple Unions
(i.e. no grouping, no filtering within subqueries, etc.) that index usage
would be reasonable to implement.
However, I can't program it myself, so I'll have to just stick to whining and
pitiful pleading <blink puppy-dog eyes, sniffle>
--
-Josh BerkusAglio Database SolutionsSan Francisco