MySQL Forums
Forum List  »  Partitioning

Re: partioning and wildcards
Posted by: Mikael Ronström
Date: September 01, 2006 06:57AM

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 );

Options: ReplyQuote


Subject
Views
Written By
Posted
4471
August 07, 2006 12:56AM
2180
August 21, 2006 10:46PM
2228
August 25, 2006 01:32AM
2360
August 25, 2006 01:40AM
Re: partioning and wildcards
2392
September 01, 2006 06:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.