Clone
Barry Fritchman <barry.fritchman@hp.com>
committed
on 19 Feb 15
Don't exclude _SALT_ from requested histograms
The optimizer sets the referenced property for non-user columns
to NOT_REFERENCED, which may … Show more
Don't exclude _SALT_ from requested histograms

The optimizer sets the referenced property for non-user columns

to NOT_REFERENCED, which may override a prior value indicating

that it is referenced for histograms. This prevents Update

Stats automation from creating an empty histogram for it to be

replaced later with an actual histogram when Update Statistics

... On Necessary Columns is executed.  The _SALT_ column is part

of the primary key, however, and it is useful to have a histogram

for it. The code was changed to avoid overwriting the referenced

field for the salt column so that its histogram might be used.

It is excluded, however, from the list of warnings for histograms

that are requested but not present, as it is not a column explicitly

created by the user.

Change-Id: If13485a3887484e83fec26e9422050024cad5e62

Closes-Bug: #1411472

Show less

default + 9 more