Thanks to Greg Stark, Tom Lane and Stephan Szabo for their advice on
rewriting my query... the revised query plan claims it should only take
about half the time my original query did.
Now for a somewhat different question: How might I improve my DB
performance by adjusting the various
shared_buffers = 128# min max_connections*2 or 16, 8KB each
Try 1500.
sort_mem = 65535# min 64, size in KB
I'd pull this in. You only have 640MB ram, which means about 8 large
sorts to swap.
How about 16000?
fsync = false
I presume you understand the risks involved with