"Shaun Thomas" <sthomas@xxxxxxxxxxxxxxxxxx> writes: > Am I correct in assuming this terrible plan is due to our ancient > version of Postgres? I missed the part where you explain why you think this plan is terrible? 412ms for what seems a rather expensive query doesn't sound so awful. Do you know an alternative that is better? regards, tom lane