cluster <skrald@amossen.dk> writes:
> I could really use any kind of suggestion on how to improve the query in
> order to make it scale better for large data sets The 6-7000 ms for a
> clean run is really a showstopper. Need to get it below 70 ms somehow.
Buy a faster disk?
You're essentially asking for a random sample of data that is not
currently in memory. You're not going to get that without some I/O.
regards, tom lane