MySQL Forums
Forum List  »  General

Loading large tables using the Synonym Switching Technique (SST)
Posted by: edward wong
Date: May 13, 2015 04:35PM

I have a large table that gets refreshed daily from an external file, that's about 2GB. In Oracle, I used to use the "Synonym Switching" technique. For an example I have a large Customers table. Each night, it needs to get refreshed. So instead we have two Customers tables, A and B. A public synonym, CUSTOMER, would be pointing at one of the two tables. So if the synonym is currently point to table A, then the refresh would start with truncating table B, and then the table would be totally refreshed, often taking a few hours.

Once the data is completely load into B, the synonym would be dropped, and re-created to point to B. The next night, the same thing would happen, but to table A.

This works well because one table would always be available for processing, while the other table can take whatever necessary time it takes to load. And if the loading fails for whatever reason, a table would always be available for processing. Of course, your requirements may differ. Anyway, my requirements are compatible to the above technique, but of course MySQL doesn't support synonyms. So is there another effective way to load large tables like I mentioned above in MySQL? Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Loading large tables using the Synonym Switching Technique (SST)
May 13, 2015 04:35PM


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.