MySQL Forums
Forum List  »  Partitioning

Re: ERROR 1025 (HY000): Error on rename of '.\reporting\#sql-a2c_1' to '.\reporting\event' (errno: -1)
Posted by: Raghavendra K
Date: August 30, 2014 03:43AM

Below is the SELECT Query

SELECT `event`.`time`, `model`.`model_name`, `model`.`network_address`, `creator`.`creator_name`, `event`.`
ype`, `event`.`event_key`, `v_security_string_accessibility_by_landscape`.`user_name`, `event`.`event_msg` FROM ((`reporting`.`event` `event` INNER JOIN `reporting`.`model` `model` ON `event`.`model_key`=`model`.`mode
_key`) INNER JOIN `reporting`.`creator` `creator` ON `event`.`creator_id`=`creator`.`creator_ID`) INNER JOIN `reporting`.`v_security_string_accessibility_by_landscape` `v_security_string_accessibility_by_landscape` ON (
model`.`landscape_h`=`v_security_string_accessibility_by_landscape`.`landscape_h`) AND (`model`.`security_string`=`v_security_string_accessibility_by_landscape`.`security_string`) WHERE (`event`.`time`>='2013-12-10 00:
1:00' AND `event`.`time`<'2013-12-10 23:59:01') AND `v_security_string_accessibility_by_landscape`.`user_name`='ad_knatan' ORDER BY `event`.`time` DESC


Many tables were been involved in this query. All table records are less than 10Million except 'event' table which has 500 Million records and keep on grows


Regarding partitions (p1, p2, p3) which got failed. I tried with two partitions and got success

mysql> ALTER TABLE event PARTITION BY RANGE COLUMNS(time) (
-> PARTITION p1 VALUES LESS THAN ('2013-12-08'),
-> PARTITION p2 VALUES LESS THAN MAXVALUE );
Query OK, 442981556 rows affected (2 days 23 hours 38 min 8.33 sec)
Records: 442981556 Duplicates: 0 Warnings: 0

is there a way to increase the execution speed? current its taking almost 3 days for 2 partitions.

Options: ReplyQuote




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.