Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption
Date
Msg-id CAOeZVicWD9a-FV2ZZnjO=2vV-ch5QAOijV6KjVdH994CAn07hw@mail.gmail.com
Whole thread Raw
In response to Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption  (Claudio Freire <klaussfreire@gmail.com>)
Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption  ("Tomas Vondra" <tv@fuzzy.cz>)
List pgsql-hackers
Hi Tomas,


>> Consider the aspects associated with open addressing.Open addressing
>> can quickly lead to growth in the main table.Also, chaining is a much
>> cleaner way of collision resolution,IMHO.
>
> What do you mean by "growth in the main table"?

Sorry, I should have been more verbose.

AFAIK, Open addressing can be slower with a load factor approaching 1
as compared to chaining. Also, I feel that implementation of open
addressing can be more complicated as we have to deal with deletes
etc.

I feel we can redesign our current chaining mechanism to have skip
lists instead of singly linked lists. I experimented with it sometime
back and I feel that it gives a stable performance with higher loads.

Regards,

Atri



-- 
Regards,

Atri
l'apprenant



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Patch: FORCE_NULL option for copy COPY in CSV mode
Next
From: Claudio Freire
Date:
Subject: Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption