Henrik Zagerholm <henke@xxxxxx> writes: > I have a SELECT query that uses Seq scans instead of index scan > despite that the index scan is faster. Try 8.2, it's a bit smarter about the costs of repeated indexscans on the inside of a nestloop. regards, tom lane