MySQL Forums
Forum List  »  Merge Storage Engine

Difference between using Merge vs. symbolic-links approach?
Posted by: M P
Date: June 05, 2007 02:00AM

Given two tables X and Y, my understanding is the following two tactics will both achieve the same goal of making each of X and Y appear to contain the data of both:
Approach 1: (i) move all Y data to X, (ii) delete table Y, (iii) create empty Y using...
CREATE TABLE `Y` ( "match table X's scheme here" )

Approach 2: (i) move all Y data to X, (ii) delete table Y, (iii) at the operating system (Unix file system) level, create symbolic links to map Y onto X, using something like...
ln -s X.frm Y.frm
ln -s X.myd Y.myi
ln -s X.myi Y.myi

My undertanding is that, given either approach, SQL queries (e.g., selects, inserts, updates, deletes) on either table operate as if X and Y are two separate but identical tables. How to choose between the two approaches??

Edited 2 time(s). Last edit at 06/05/2007 02:08AM by M P.

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.