MySQL Forums
Forum List  »  Archive Storage Engine

Re: Merging Archive tables with MyISAM tables
Posted by: Beat Vontobel
Date: March 01, 2006 04:41PM

Unfortunately: No!

The idea of using UNION VIEWs to emulate partitioning/merging seems to be doomed by current restrictions of both VIEWs and UNIONs. See my blog post at http://www.futhark.ch/mysql/137.html

So the current best practice to combine ARCHIVE and other engines for historical respectively current data seems to be one of the following:

1. Check the data range in your application code and just replace the table name in the statement accordingly. If the queried range spans more than one table combine the result sets of multiple queries or build a UNION query dynamically.

2. Encapsulate your queries in a stored procedure and do the range check there. You should make use of dynamic SQL to build the UNION query or combine multiple result sets using a temporary table.

Regards,
Beat

Beat Vontobel
http://www.futhark.ch/mysql

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Merging Archive tables with MyISAM tables
4373
March 01, 2006 04:41PM


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.