2010/10/2 Kevin Grittner <kevin.gritt...@wicourts.gov>: > Tom Lane <t...@sss.pgh.pa.us> wrote: >> Hitoshi Harada <umi.tan...@gmail.com> writes: >>> Another suggestion? >> >> The implementation I would've expected to see is to do the sort >> and then have two code paths for retrieving the median, depending >> on whether the sort result is all in memory or not. > > Would it make sense to accumulate value/count pairs in a hash table,
Maybe, but it still has memory problem if the values vary, right? And I'm not familiar with the algorithm of median other than what the current patch does, so I'm not sure if hash table solution can be made easily. Regards, -- Hitoshi Harada -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers