How to optimize this complicated EAV MYSQL query?
问题 Is it possible to optimize this query I have written I've created a sort of dynamic virtual database to give my users the ability to add custom fields without affecting the database structure. Here is a very simplified view of the stucture so far. tables | columns db_cases | caseid db_structure | fieldname db_data | fieldname, data, caseid db_names | nameid We can create a new field by adding a row to db_structure Any data we wish to record is recorded to db_data. Names are stored in db_names