The article states that order of join matters because then nest loops differently. But we still go through entire loops everywhere. Where do those numbers in the example come from? If we have 1000, 20 and 200 elements in 3 loops, algorithmically, it does not matter in which order you iterate. Complexity is always 1000×20×200.What am I missing?
kebsup|1 year ago
It's better to check A x C before A x B if you know that A x C has less matching rows, because the final loop will be shorter.
bogdan-lab|1 year ago