Skip navigation links

MySQL Forums :: Partitioning :: Do I have to re write querries when Partitioning?


Advanced Search

Re: Do I have to re write querries when Partitioning?
Posted by: Rick James ()
Date: September 03, 2010 07:26PM

PRIMARY KEY (`id`), -- Yes, id is your PK
KEY `part_of_keywords` (`keywords`(30)), -- here's on INDEX
KEY `part_of_category` (`category`), -- here's another
KEY `part_of_country` (`country`(10)),
KEY `part_of_zip` (`zip`),

"INDEX" == "KEY"

PARTITION would make it fast to dump old records. You can probably do that with an ALTER PARTITION instead of DELETE.

To establish partitioning on the table, you would have to make some kind of clumsy change to the PRIMARY KEY.

No changes to INSERT, SELECT, etc are needed.

Any SELECT that does not reference what you are partitioning on will have to search every partition. This means that it is no faster, possibly slower, than if you had a single table.

What do your SELECTs look like?

SHOW TABLE STATUS LIKE 'yspnash_auctions' \G

Options: ReplyQuote


Subject Views Written By Posted
Do I have to re write querries when Partitioning? 2951 john hango 09/01/2010 11:17PM
Re: Do I have to re write querries when Partitioning? 1002 john hango 09/02/2010 04:09AM
Re: Do I have to re write querries when Partitioning? 1095 Rick James 09/03/2010 07:26PM
Re: Do I have to re write querries when Partitioning? 1206 john hango 09/05/2010 07:43PM
Re: Do I have to re write querries when Partitioning? 1056 john hango 09/05/2010 07:45PM
Re: Do I have to re write querries when Partitioning? 957 john hango 09/05/2010 07:47PM
Re: Do I have to re write querries when Partitioning? 1146 john hango 09/05/2010 07:51PM
Re: Do I have to re write querries when Partitioning? 864 john hango 09/05/2010 07:52PM
Re: Do I have to re write querries when Partitioning? 1305 john hango 09/05/2010 07:52PM
Here are some of the crons that run. 938 john hango 09/06/2010 11:38PM
Re: Here are some of the crons that run. 1089 john hango 09/06/2010 11:39PM
Slowest query is when I click on a category on my site that has alot of products 1516 john hango 09/08/2010 11:33AM
Re: Do I have to re write querries when Partitioning? 943 Rick James 09/10/2010 08:00PM


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.