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
Subject
Views
Written By
Posted
5044
September 01, 2010 11:17PM
1893
September 02, 2010 04:09AM
Re: Do I have to re write querries when Partitioning?
2066
September 03, 2010 07:26PM
5594
September 05, 2010 07:43PM
2208
September 05, 2010 07:45PM
9699
September 05, 2010 07:47PM
3911
September 05, 2010 07:51PM
1965
September 05, 2010 07:52PM
3889
September 05, 2010 07:52PM
1746
September 06, 2010 11:38PM
2389
September 06, 2010 11:39PM
3451
September 08, 2010 11:33AM
1816
September 10, 2010 08:00PM