Ed Loehr <ELOEHR@austin.rr.com> writes:
> Yes, the query plan changes between working state and non-working state.
> Vaccum triggers the change. Other things may also, I'm not sure yet. Here
> are the failing and successful query plans, respectively...
Mmmm ... I suspected it had something to do with indexscan on the inner
side of a nestloop (the optimizer has some strange hacks for that).
Looks like I was right. Could I trouble you for the EXPLAIN VERBOSE
output, rather than just EXPLAIN? (Preferably, the pretty-printed form
that gets dumped into the postmaster log, not the unreadable form that
psql shows.)
regards, tom lane