Recently our server provider told us there are many tmp tables created on disk by Mysql , and cause Disk I/O abuse. I think this happens because of the below code:
$features = db_get_array("SELECT DISTINCT(a.description), b.parent_id FROM ?:product_features_descriptions as a LEFT JOIN ?:product_features as b ON a.feature_id = b.feature_id WHERE a.lang_code = ?s AND b.feature_type != ?s ORDER BY b.parent_id, a.description ASC", DESCR_SL, 'G');
How can I optimize this, could anyone help me ?