1、in与exists的比较
假定A为主表,B为子表,如果B中数据量较少,in 的效率比exsits的效率高,若B的数据量比A大,exists的效率高
2、not in与not exists的比较
无论哪个表大,用not exists效率比not in 高
1、in与exists的比较
假定A为主表,B为子表,如果B中数据量较少,in 的效率比exsits的效率高,若B的数据量比A大,exists的效率高
2、not in与not exists的比较
无论哪个表大,用not exists效率比not in 高