MySQL Forums
Forum List  »  Partitioning

Pruning with HASH or KEY
Posted by: Shlomi Noach
Date: August 19, 2006 12:50AM

Hello, everyone,

In the latest article on developer zone, "MySQL 5.1 New Features: MySQL Partitions", the writer says that "Pruning is good with RANGE and LIST partitions, irrelevant with HASH and KEY partitions".

However, on MySQL 5.1 reference manual, http://mysql.com/doc/refman/5.1/en/partitioning-pruning.html, it says: "For tables that are partitioned by HASH or KEY, partition pruning is also possible. However, it can be used only on integer columns of tables using these partitioning types..."

Which of the two is correct?

I have a table my_table which I partition by HASH over an int field my_field (which is, accidently, one of the keys for the table - it has an index - but not the primary key).
Will MySQL perform pruning when I query:
SELECT * FROM my_table WHERE my_field = 1234 AND other_field = 5678 AND ...
?

Is there a general way (such as in EXPLAIN SELECT) to know in advance if MySQL will perform pruning?

Thanks in advance,
Shlomi

Options: ReplyQuote


Subject
Views
Written By
Posted
Pruning with HASH or KEY
3191
August 19, 2006 12:50AM
2339
August 21, 2006 01:59AM
2097
August 22, 2006 04:52AM
2169
August 21, 2006 04:11AM
2121
August 22, 2006 04:51AM


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.