Archives of the TeradataForum
Message Posted: Wed, 02 Jul 2003 @ 08:42:05 GMT
Subj: | | Re: Dynamic Sampling |
|
From: | | Sanjaya Nagabhushan |
When statistics are not available, the optimizer dynamically does a "Random AMP Sampling" as & when required while processing a
request. Based on the Table-ID, a random AMP is selected & statistics are constructed based on the subset of the table rows residing on
that AMP only.
This method of generating statistics is very much dependent on the evenness of distribution of the table rows across the AMPs. If the AMP
sampled doesn't have the correct share of the table, the statistics thus constructed would definitely be skewed & might mislead the
optimizer into generating sub-optimal plans.
On the other hand, if the distribution is even, this approach would be better since the optimizer would have the most current
statistics.
Sanjay
|