List:MaxDB« Previous MessageNext Message »
From:Holger Becker Date:July 3 2007 7:25am
Subject:RE: [LIKELY JUNK]Update Statiscts SAMPLE_ROWS
View as plain text  
Daniel Castro wrote:

> Hi,
> 
> I want to know the % of rows to be used as sample_rows for a 
> table, because
> I get the following message:
> 
> I  1 tables contain > 1.000.000 records but only 20.000 rows 
> will be sampled
> for statistics
>       CON: NUM_TABS_FEW_SAMPLE_ROWS > 0
>       VAL: 1
> 
> Is there any pattern?
> How I change this value?
> 
> Best Regards,

Hi Daniel,

our recommendation is to use a sample rate of 5% for at least all tables with more than
1000000 rows.
But from my point of view you could also use it for smaller tables as long as the runtime
of the 
update statistic command doesn't influence your system to much.

You could change the sample rate with "alter table <table name> sample <unsigned
int> percent | rows".

To check the actual sample rate use "select schemaname, tablename , sample_percent,
sample_rows from tables".

Kind regards
Holger


Holger Becker
MaxDB&liveCache
SAP AG
www.sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO),  Léo Apotheker,
Werner Brandt, Claus Heinrich, Gerhard Oswald, Peter Zencke
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner 
Registergericht/Commercial Register Mannheim No HRB 350269

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche
Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist
Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der
E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.

This e-mail may contain trade secrets or privileged, undisclosed, or otherwise
confidential information. If you have received this e-mail in error, you are hereby
notified that any review, copying, or distribution of it is strictly prohibited. Please
inform us immediately and destroy the original transmittal. Thank you for your
cooperation. 

 
Thread
Update Statiscts SAMPLE_ROWSDaniel Castro2 Jul
  • RE: [LIKELY JUNK]Update Statiscts SAMPLE_ROWSHolger Becker3 Jul