Re: multivariate statistics / patch v7 - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: multivariate statistics / patch v7
Date
Msg-id 55638982.40904@2ndquadrant.com
Whole thread Raw
In response to Re: multivariate statistics / patch v6  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: multivariate statistics / patch v7  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Re: multivariate statistics / patch v7  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
Hello,

attached is v7 of the multivariate stats patch. The main improvement is
major refactoring of the clausesel.c portion - splitting the awfully
long spaghetti-style functions into smaller pieces, making it much more
understandable etc.

I do assume some of those pieces are unnecessary because there already
is a helper function with the same purpose (but I'm not aware of that).
But IMHO this piece of code begins to look reasonable (especially when
compared to the previous state).

The other major improvement it review of the comments (including FIXMEs
and TODOs), and removal of the obsolete / misplaced ones. And there was
plenty of those ...

These changes made this version ~20k smaller than v6.

The patch also rebases to current master, which I assume shall be quite
stable - so hopefully no more duplicate OIDs for a while.

There are 6 files attached, but only 0002-0006 are actually part of the
multivariate statistics patch itself. The first part makes it possible
to use pull_varnos() with expression trees containing RestrictInfo
nodes, but maybe this is not the right way to fix this (there's another
thread where this was discussed).

Also, the regression tests testing plan choice with multivariate stats
(e.g. that a bitmap index scan is chosen instead of index scan) fail
from time to time. I suppose this happens because the invalidation after
ANALYZE is not processed before executing the query, so the optimizer
does not see the stats, or something like that.


regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Attachment

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: fsync-pgdata-on-recovery tries to write to more files than previously
Next
From: Josh Berkus
Date:
Subject: Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful