Not sure if this can be done without UNION. I think it is the UNION which makes it slow. The two parts are quite fast on their own, but combined with the UNION this code takes > 5 seconds to complete. Can it be optimized?
SELECT rl.Updated, c.CultureName, "CollectionName" as CollectionName, k.KeyName , rl.Value , s.StatusName , rl.Comment , rl.Comment as ActionInfo, a.ActionName, u.UserName FROM ResourceLog rl INNER JOIN `Status` s ON rl.StatusId = s.StatusId INNER JOIN Culture c ON rl.CultureId = c.CultureId INNER JOIN `Key` k ON rl.KeyId = k.KeyId LEFT JOIN `Action` a ON rl.ActionId = a.ActionId LEFT JOIN `User` u ON rl.UserId = u.UserId UNION SELECT imp.Created as Updated, "Imported" as CultureName, "None" as CollectionName, "Imported" as KeyName, "Imported" as Value, "Imported" as StatusName, "Imported" as Comment, "ActionInfo" as ActionInfo, "Imported" as ActionName, UserId FROM Import imp ORDER BY Updated DESC, KeyName, CultureName limit 50