4 ms·
It's worth mentioning that MySQL (iirc) does support sort-merge joins, which aren't mentioned by this article. So it's not a case of (index) nested loops joins
by AlisdairO 15y ago
It's worth mentioning that MySQL (iirc) does support sort-merge joins, which aren't mentioned by this article. So it's not a case of (index) nested loops joins or nothing. While hash joins are usually significantly faster than sort-merge, they have a variety of similar characteristics, and don't suffer from the mash-the-b-tree issue that index nested loops do. Overall this makes me doubt that the lack of hash joins is the fundamental reason some people think joins are slow.
- nerfhammer 15y agoMySQL only supports nested inner loop joins.
- AlisdairO 15y ago...ah, I just bothered to check it out in more detail, and you're kind-of right. MyISAM only supports nested loops (which I have to say surprised me), but InnoDB (which, let's face it, is the backing store that allows mysql to qualify as a 'real' RDBMS) supports hash joins.