Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Update Statiscts SAMPLE_ROWS

Update Statiscts SAMPLE_ROWS

2007-07-03       - By Becker, Holger

 Back
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.



--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)