Ray Ontko <[EMAIL PROTECTED]> writes: > BTW, Are you sure that you need to do the "distinct"?
That's a good question to ask. > If you do, > then you might try putting the order_date column first in the > select list. The distinct is requiring that all the rows be sorted > so that they can be uniqified. I'm hoping that by putting order_date > first in the that the sort will have to do less work to put them in > order. (Anyone know if this will actually help?) I don't believe it will help much if at all. Increasing sort_mem might help, though. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly