~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/analyze.rst

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
ANALYZE 
 
1
ANALYZE
2
2
=======
3
3
 
4
 
ANALYZE TABLE table_name [, table_name] ...
5
 
 
6
 
ANALYZE TABLE read locks a table, and then analyzes and stores the key distribution for a table.
 
4
Syntax:
 
5
 
 
6
.. code-block:: mysql
 
7
 
 
8
        ANALYZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] 
 
9
 
 
10
ANALYZE TABLE usually read locks a table, and then analyzes and stores
 
11
the key distribution for a table.
 
12
 
 
13
ANALYZE functionality differs depending on the storage engine.
 
14
 
 
15
On InnoDB tables, using ANALYZE will result in a WRITE LOCK on the
 
16
table. It also will not perform an explicit gathering of statistics
 
17
when you issue an ANALYZE command. To update the index cardinality,
 
18
there will be 10 random dives into each index, retrieving an estimated
 
19
cardinality. Therefore, several ANALYZE TABLEs in a row are likely to
 
20
produce different results each time.
 
21
 
 
22
Statistics-gathering with ANALYZE has recently been added to HailDB so
 
23
that index dives are performed.