complex website database

Hello, i m new to this forum

I ve got a little question about a database structure

for two given website, i have one database



when i m logged in the first website, the article are taken from article_site1

when i m logged in the second website, the article are taken from article_site2

when i m logged in the second website, i m logged in the first website (vice versa)

now i would like to do a view of an union of articles_site1 and articles_site2, in order to display information (like similar discusions for an article) taken from the union of the two tables

what is the best chose temporarytable or merge, i think it s temporarytable but i m not sure, my other problem is that fulltext is not supported on view,

i looked at this article, but didn’t manage to find the answer -performance-troublemaker/

i was thinking to merge this two articles_siteX table in one, and to update them via a cron at night, will this give me bette performance ?

thanks in advance

Why not consolidate the two tables into a single table with a tinyint (1 byte) column “site_id”?


thanks for your answer,

indeed i could do that, but i m using a “ready to serve” cms, and that will be too much work for maintenance

Why not just do

SELECT * FROM articles_site1
SELECT * FROM articles_site2

Then you can take advantage of the fulltext indexes on each table and sort the final results.


the goal is to hide complexity (as i m using this view for similar discussion and other stuff)


more over i ve done a “union all” (see n-all-performance/)