Hello!
I have a normalized MySQL database. Now I have a task to join all tables in the database, in order then to use universal query to it. I know that it is not a good idea, but in any case I must do it.
I made LEFT OUTER JOIN to join tables. It looks like:
SELECT * from language L
LEFT JOIN (select documentId as docId,documentName,parentDocId,version,creationDat e,
lastChanges,tiId,languageId as docLanguageId,description,readOnly,keywords,conten t,documentType from document)
AS D on L.languageId=D.docLanguageId
LEFT JOIN timeinterval TI on TI.tiId=D.tiId
LEFT JOIN activity A on A.activityId= TI.activityId
LEFT JOIN project P on P.projectId= TI.projectId
LEFT JOIN groupproject GP on GP.projectId = P.projectId
LEFT JOIN ugroup G on G.groupId = GP.groupId;
......
I will not write the whole join, it is too big.
It takes too much time to execute this query. Maybe somebody knows how to do it in more performant way, could you, please, help me?
thank you in advance.