"Harry Hehl" <Harry.Hehl@xxxxxxxxxxxxxx> writes: > Nested Loop IN Join (cost=21432.32..951981.42 rows=204910 width=217) > Join Filter: ("outer".objectid = "inner".ref_oid) > -> Append (cost=0.00..8454.10 rows=204910 width=217) > -> Seq Scan on omfile (cost=0.00..8428.20 rows=204320 > width=217) > -> Seq Scan on omimagefile omfile (cost=0.00..12.70 rows=270 > width=217) > -> Seq Scan on omclipfile omfile (cost=0.00..13.20 rows=320 > width=217) > -> Materialize (cost=21432.32..21434.32 rows=200 width=16) > -> Unique (cost=20614.91..21430.12 rows=200 width=16) > -> Sort (cost=20614.91..21022.52 rows=163041 width=16) > Sort Key: ts.ref_oid > -> Seq Scan on ts (cost=0.00..3739.41 rows=163041 > width=16) > (11 rows) > Time: 164.232 ms > So how can I get index scans to work consistently with joins? It's not the join that's the problem, it's the inheritance. I recently improved the planner so that it can consider appended indexscans for an inheritance tree on the inside of a join, but no pre-8.2 release can do it. regards, tom lane