MySQL Forums
Forum List  »  Partitioning

Re: Failed to read from the .par file
Posted by: Rick James
Date: April 05, 2014 01:13PM

> error: Failed to read from the .par file

File a bug at bugs.mysql.com

> DELETE FROM p_table WHERE DATE(Pdate) = '2013-12-21';

It is very inefficient to hide a column (Pdate) in a function (DATE) in the WHERE clause, especially if Pdate is indexed, and even more especially if Pdate is the "PARTITION key".

If Pdate is DATE datatype, simply do Pdate = '2013-12-21'.
If Pdate is DATETIME or TIMESTAMP, do
Pdate >= '2013-12-21' AND
Pdate < '2013-12-21' + INTERVAL 1 DAY

That change will allow "partition pruning" and/or usage of an INDEX.

More on Partitioning:
http://mysql.rjweb.org/doc.php/partitionmaint

Options: ReplyQuote


Subject
Views
Written By
Posted
9923
April 02, 2014 09:49AM
Re: Failed to read from the .par file
5665
April 05, 2014 01:13PM


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.