HyperLogLog.c and pg_leftmost_one_pos32() - Mailing list pgsql-hackers

From Jeff Davis
Subject HyperLogLog.c and pg_leftmost_one_pos32()
Date
Msg-id 17068336d300fab76dd6131cbe1996df450dde38.camel@j-davis.com
Whole thread Raw
Responses Re: HyperLogLog.c and pg_leftmost_one_pos32()  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Is there a reason that HyperLogLog doesn't use pg_leftmost_one_pos32()?

I tried the following patch and some brief performance tests seem to
show an improvement.

This came up because my recent commit 9878b643 uses HLL for estimating
the cardinality of spill files, which solves a few annoyances with
overpartitioning[1]. I think it's overall an improvement, but
addHyperLogLog() itself seemed to show up as a cost, so it can hurt
spilled-but-still-in-memory cases. I'd also like to backpatch this to
13 (as I already did for 9878b643), if that's acceptable.

Regards,
    Jeff Davis

[1] 
https://www.postgresql.org/message-id/CAH2-Wznidojad-zbObnFOzDA5RTCS0JLsqcZkDNu+ou1NGYQYQ@mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: IDEA: pg_stat_statements tracking utility statements by tag?
Next
From: Jeff Davis
Date:
Subject: Re: Default setting for enable_hashagg_disk