[TYPO3-core] FYI #14182: Multiple join conditions are not supported
Xavier Perseguers
typo3 at perseguers.ch
Fri Apr 23 08:21:28 CEST 2010
Hi,
> The query optimizer cannot really do much here, since it sees it's a
> LEFT JOIN it cannot move conditions around except trying to understand
> how much rows each request
> will return. Since there are just a couple of rows in the tables the
> query optimizer will simply do table scans and not use a key at all.
>
> Putting a condition in the ON clause doesn't have much to do with
> optimizing (not completely true), but telling your DMB what rows you are
> interested in.
> See below for some examples of this.
Exactly. The problem is not with an INNER JOIN but with the LEFT JOIN.
> It's true that some RDBM systems behave differently when handling NULL.
> Best practice is to avoid NULL in a RDBM unless you really really need it.
>
> [...]
Thanks very much for your work Ries. I was about to do something similar but... ;-)
--
Xavier Perseguers
http://xavier.perseguers.ch/en
More information about the TYPO3-team-core
mailing list