Aikesheng Open Source Community
Apr 9, 2024 · Databases
Understanding Why OceanBase Cannot Use HASH ANTI JOIN and Optimizing NOT IN Queries
This article analyzes a slow NOT IN subquery that OceanBase rewrites into a NESTED‑LOOP ANTI JOIN, explains why HASH ANTI JOIN is not chosen due to NULL‑sensitive semantics and missing NOT NULL constraints, compares the behavior with Oracle's Null‑Aware Anti Join, and provides practical rewrite and hint‑based optimization recommendations.
Anti JoinOceanBaseOracle
0 likes · 17 min read