> > If I do a view that produces the data I want through joins, it takes
hours,
> > even with all fields indexed, and after VACUUM ANALYZE. Doing SET
ENABLE
> > SEQ_SCAN = OFF doesn't seem to make any difference. The query plan
changes,
> > but select times are still roughly the same... Doing the
"Gordan Bobic" <[EMAIL PROTECTED]> writes:
> If I do a view that produces the data I want through joins, it takes hours,
> even with all fields indexed, and after VACUUM ANALYZE. Doing SET ENABLE
> SEQ_SCAN = OFF doesn't seem to make any difference. The query plan changes,
> but select times are s
> > SELECT * FROM Table1 INNER JOIN Table2 ON (Table1.Field1 =
> > Table2.Field1)
> > WHERE Table1.Field1 = 'SomeValue';
> > [ is slow, but this is fast: ]
> > SELECT * FROM Table1 INNER JOIN Table2 ON (Table1.Field1 =
> > Table2.Field1)
> > WHERE Table1.Field1 = 'SomeValue' AND Table2.Field1 = 'S
I am not sure if this is a bug, an oversight or something else entirely,
but it would appear that if there are two tables, Table1 and Table2, which
are joined using INNER JOIN, specifying WHERE = one of the join fields
doesn't automatically get equalised to the other field.
For example:
SELECT