>  Q&A  >  본문

mysql 比较两个表数据优化问题

PHP中文网PHP中文网2765일 전763

모든 응답(2)나는 대답할 것이다

  • PHP中文网

    PHP中文网2017-04-17 16:44:31

    // acc_id 加索引
    SELECT accinfo_id FROM acc_accinfo acc
    
    WHERE acc.`is_delete` = 1 AND  acc_id NOT in (
        SELECT  acc_id FROM acc_circulate_setting where area_id = 1  AND is_delete = 1 
        );
        
     // 或者分2步查   

    회신하다
    0
  • 阿神

    阿神2017-04-17 16:44:31

    acc_accinfo的accinfo_id是不是没有索引

    회신하다
    0
  • 취소회신하다