Re: partioning and wildcards
Hi,
Unfortunately the function ASCII(LOWER(...)) cannot be deducted by
MySQL at present to generate range-based partition pruning. I think
it would be safe though so it could be considered.
I am also working on a new variant of partitioning for 5.2 that will
solve problems with partitioning on VARCHAR's.
Rgrds Mikael
Pascal Knapen Wrote:
-------------------------------------------------------
> something like this:
>
> create table tbl_ngram(
> pk_ngram_id INT NOT NULL AUTO_INCREMENT,
> ngram_name varchar(255) NOT NULL,
> PRIMARY KEY (pk_ngram_id, ngram_name)
> )
> partition by range (ASCII(LOWER(ngram_name)))
> (partition p0 values less than (ASCII('a')),
> partition p1 values less than (ASCII('b')),
> partition p2 values less than (ASCII('c')),
> partition p3 values less than (ASCII('d')),
> partition p4 values less than (ASCII('e')),
> partition p5 values less than (ASCII('f')),
> partition p6 values less than (ASCII('g')),
> partition p7 values less than (ASCII('h')),
> partition p8 values less than (ASCII('i')),
> partition p9 values less than (ASCII('j')),
> partition p10 values less than (ASCII('k')),
> partition p11 values less than (ASCII('l')),
> partition p12 values less than (ASCII('m')),
> partition p13 values less than (ASCII('n')),
> partition p14 values less than (ASCII('o')),
> partition p15 values less than (ASCII('p')),
> partition p16 values less than (ASCII('q')),
> partition p17 values less than (ASCII('r')),
> partition p18 values less than (ASCII('s')),
> partition p19 values less than (ASCII('t')),
> partition p20 values less than (ASCII('u')),
> partition p21 values less than (ASCII('v')),
> partition p22 values less than (ASCII('w')),
> partition p23 values less than (ASCII('x')),
> partition p24 values less than (ASCII('y')),
> partition p25 values less than (ASCII('z')),
> partition p26 values less than MAXVALUE );