Use transactions instead of sub-requests.
Use utf8_bin collation when case sensitivity is needed.