Optimizedb: -zw flag

In article <34227335.71E6@it.postoffice.co.uk>, Graham Harrison
 wrote:

> I am having trouble understanding the '-zw' flag on the optimizedb
utility with Ingres 
> 6.4/04+.
> 
> ....

The complete flag is mainly for use when joining two tables, I believe.
The idea is that all the fancy stats are of somewhat limited usefulness
when planning the join r.columnA = s.columnB.  True, I suppose that
some comparison of the two histograms could be done (I don't know if
the optimizer does that or not).  But basically it has to guess what
the result will be.

The default guess is that 10% of the rows in one relation will match
anything in the other.  The "complete" flag (-zw) says that if the
column is the target (right) side of a join, assume that 100% of the
left side rows will match something.  That's what the manual is
trying to get at with the "all possible values" phrase.

Having said that, there are various instances where the complete flag
is turned off, sometimes inappropriately IMHO.  And, I'm not even
sure that the complete flag carries the same meaning (or indeed, any
meaning at all) in OpenIngres 1.2 or 2.0.  I complained about the
cavalier treatment of the complete flag to the estimable Mr Inkster
quite a long time ago, and even back then there were plans afoot to
handle things differently.

Karl
Ingres Q & A
Back to William's Home Page

© William Yuan 2000

Email William