最近我们的服务器提供商告诉我们,Mysql在磁盘上创建了许多临时表,导致磁盘I/O滥用。我认为这是因为下面的代码造成的:
$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