When we use NULL-safe operator with row comparisons like (A, B) <=> (C, D) then its performance is equivalent to (A <=> C) AND (B <=> D). Following example will demonstrate it −
mysql> Select (100,50) <=> (50,100); +-----------------------+ | (100,50) <=> (50,100) | +-----------------------+ | 0 | +-----------------------+ 1 row in set (0.00 sec) mysql> Select (100,50) <=> (100,50); +-----------------------+ | (100,50) <=> (100,50) | +-----------------------+ | 1 | +-----------------------+ 1 row in set (0.00 sec)
The above result sets show how NULL-safe operators can be used with row comparison.