Quoting "markir(at)paradise(dot)net(dot)nz" <markir(at)paradise(dot)net(dot)nz>:
> Hmm - that first query needs to do a sort, so you might want to> experiment with> the sort_mem parameter
Oops - I mean work_mem...