Category: RandomQueryGenerator

RandomQueryGeneratorPartitioning

Contents

[edit] Generating Partitioned Tables

It is possible to generate partitioned tables from a .ZZ file, as follows:

$tables = {
  rows => [10],
  partitions => [ undef , 'KEY (pk) PARTITIONS 2' ]
};

$fields = {
  types => [ 'int' ],
  indexes => [undef, 'key']
};

When the tables are generated, the PARTITION BY clause will be wrapped in /*!50100 */ comments. This allows for comparison tests, where one of the servers is a 5.0. The tables will be created without partitions on such a server.

[edit] Existing Partitioning Tests

[edit] Comparison Tests

It is possible to compare the result set returned by a query on a partitioned table against the result set returned by a non-partitioned table having the same structure. For example:

perl runall.pl \
  --grammar=conf/partitions-ddl.yy \
  --basedir1=/path/to/mysql-with-partitions \
  --basedir2=/path/to/mysql-without-partitions \
  --threads=1 

[edit] Partition DDL and Key Cache

The conf/partitions-ddl.yy grammar contains a wide range of partitioning-related DDL statements, along with operations on the key cache and assigning a particular key cache to a particular partition.

No Validator is available to go along with this grammar (except a possible comparison between two servers), so this test would catch mostly deadlocks and crashes/assertions.

When using partitions-ddl.yy for comparison tests, please note that this grammar includes DROP PARTITION and TRUNCATE PARTITION which have no corresponding query against a non-partition table, and thus will cause the two servers to diverge if one does not support partitions.

[edit] Partition Pruning

A specific test is TBD for testing the accuracy of partition pruning. Such a test would target complex/creative WHERE clauses.

Retrieved from "http://forge.mysql.com/wiki/RandomQueryGeneratorPartitioning"

This page has been accessed 1,126 times. This page was last modified 15:03, 20 September 2009.

Find

Browse
MySQLForge
Main Page
Current events
Recent changes
Random page
Help
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Special pages
New pages
File list
Statistics
Bug reports
More...