On Thu, Jan 30, 2014 at 12:23 PM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Wed, Jan 29, 2014 at 8:13 PM, Heikki Linnakangas > <hlinnakan...@vmware.com> wrote: > > Few observations in patch (back-to-pglz-like-delta-encoding-1): > > 1. > +#define pgrb_hash_unroll(_p, hindex) \ > + hindex = hindex ^ ((_p)[0] << 8) > > shouldn't it shift by 6 rather than by 8. > > 2. > + if (bp - bstart >= result_max) > + return false; > > I think for nothing or lesser match case it will traverse whole tuple. > Can we optimize such that if there is no match till 75%, we can bail out. > Ideally, I think if we don't find any match in first 50 to 60%, we should > come out. > > 3. pg_rbcompress.h is missing. > > I am still working on patch back-to-pglz-like-delta-encoding-1 to see if > it works well for all cases, but thought of sharing what I have done till > now to you. > > After basic verification of back-to-pglz-like-delta-encoding-1, I will > take the data with both the patches and report the same.
Apart from above, the only other thing which I found problematic is below code in find match + while (*ip == *hp && thislen < maxlen) + thislen++; It should be while (*ip++ == *hp++ && thislen < maxlen) Please confirm. With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers