MYSQL LEFT JOIN optimization with CASE
问题 I spent some time trying to get working this SELECT with CASE but I failed... (thank to that I'm using COLASCE() now) How could I optimize this SELECT by using CASE/IF sentences? Is this a fast way to query from different tables selected by a field? SELECT a.folderid, a.foldername, a.contenttype, COALESCE(b.descriptor, c.descriptor, d.descriptor, e.descriptor, f.descriptor) as descriptor FROM t_folders a LEFT JOIN t_files b ON a.contenttype = 'file' AND a.contentid = b.fileid LEFT JOIN t