Re: [GENERAL] Another optimizer question

2001-01-19 Thread Gordan Bobic
> > 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

Re: [GENERAL] Another optimizer question

2001-01-19 Thread Tom Lane
"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

Re: [GENERAL] Another optimizer question

2001-01-19 Thread Gordan Bobic
> > 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

[GENERAL] Another optimizer question

2001-01-18 Thread Gordan Bobic
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