Mysql query with Left Join is too very slow

后端 未结 6 1146
萌比男神i
萌比男神i 2021-02-13 16:09

Query:

   select `r`.`id` as `id` 
     from `tbl_rls` as `r` 
left join `tblc_comment_manager` as `cm` on `cm`.`rlsc_id` != `r`.`id`

Both tabl

6条回答
  •  有刺的猬
    2021-02-13 16:39

    Consider also indexing your tables. We're running multiple left joins on a 1million+ record table that doesn't take more than a second or two to return results.

提交回复
热议问题