> I also
> enforced the index scan and compared with forbidding the index scan.
The
> result was on my more realistic examples that both versions performed
quite
> the same. There was no *real* difference. For sure in this simple
query there
> is a difference but the real examples showed only 2% - 5% speed
increase
> (if not slower with enforcing index scans!).
You could somewhat speed up the query if you avoid that the sort
hits the disk. A simple test here showed, that you need somewhere
near sort_mem = 15000 in postgresql.conf.
Andreas