Hi,
I'm using a workaround for this kind of issues:
consider:
select A from
(select B from T1 where C
union
select B from T2 where C
union
select B from T3 where C
) foo
where D
in your
Hi,
I've got a query that I think the query optimiser should be able
to work it's magic on but it doesn't! I've had a look around and
asked on the IRC channel and found that the current code doesn't
attempt to optimise for what I'm asking it to do at the moment.
Here's a bad example:
SELECT
Sam Mason [EMAIL PROTECTED] writes:
Here's a bad example:
SELECT u.txt
FROM smalltable t, (
SELECT id, txt FROM largetable1
UNION ALL
SELECT id, txt FROM largetable2) u
WHERE t.id = u.id
AND t.foo = 'bar';
I was hoping that smalltable would get moved up into the
Tom Lane wrote:
It'd be nice to fix this someday, but don't hold your breath ...
Thanks for the response!
Is it even worth me thinking about trying to figure out how to make
the current code do this sort of thing? or is it just not going to
happen with the code as it is?
Sam
Sam Mason [EMAIL PROTECTED] writes:
Tom Lane wrote:
It'd be nice to fix this someday, but don't hold your breath ...
Is it even worth me thinking about trying to figure out how to make
the current code do this sort of thing?
Probably not :-(. What we need is to integrate UNION (and the