take MySQL as an example, what is the difference (principle and efficiency) between in and exists and between not in and not exists? What about using indexes? Say that not in and < > will not use indexes, won"t you?
take MySQL as an example, what is the difference (principle and efficiency) between in and exists and between not in and not exists? What about using indexes? Say that not in and < > will not use indexes, won"t you?
refer to this: https://codeshelper.com/a/11.
select * from T1 where exists (select 1 from T2 where T1.a=T2.a)
select * from T1 where T1.an in (select T2.a from T2)
in short, the general formula is: large appearance, large inner table with IN;, and EXISTS.
" details "
Previous: WebSocket handshake failed 400 error