* Stephen Frost (sfr...@snowman.net) wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > ISTM the first thing we'd need to have before > > we could think about this rationally is some measurements about the > > frequencies of different List lengths in a typical workload. > > I agree, that'd be a good thing to have. I'll look into measuring that.
Ok, it took me, uh, a little while to get around to this, but: http://tamriel.snowman.net/~sfrost/list_histgram.svg Is what our list lengths look like for the regression tests. We could do a pg_bench run, but it looks like Tom's right here- the vast majority of our lists are small. Highlights: 63% are 1-element 25% are 2-element Lists of 4 or fewer elements are 97% Lists of 8 or fewer elements are 99% So, when it comes to palloc() reduction, this patch would eliminate 99% of palloc's due to lists. For the regression tests, we're talking about reducing 893,206 palloc calls to only 1. Thanks, Stephen
signature.asc
Description: Digital signature