mysql partitioning

Posted by Yang on Stack Overflow See other posts from Stack Overflow or by Yang
Published on 2010-04-21T01:42:12Z Indexed on 2010/04/21 1:43 UTC
Read the original article Hit count: 352

just want to verify that database partition is implemented only at the database level, when we query a partitioned table, we still do our normal query, nothing special with our queries, the optimization is performed automatically when parsing the query, is that correct?

e.g. we have a table called 'address' with a column called 'country_code' and 'city'. so if i want to get all the addresses in New York, US, normally i wound do something like this:

select * from address where country_code = 'US' and city = 'New York'

if now the table is partitioned by 'country_code', and i know that now the query will only be executed on the partition which contains country_code = US. My question is do I need to explicitly specify the partition to query in my sql statement? or i still use the previous statement and the db server will optimize it automatically?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-query