diff options
| author | Owen Jacobson <owen.jacobson@grimoire.ca> | 2013-01-23 15:39:54 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen.jacobson@grimoire.ca> | 2013-01-23 15:39:54 -0500 |
| commit | 469e0a3d74ad74972186881e20717c989cb8b3ab (patch) | |
| tree | ff7e29c058e022346c420b363b628b933bd8f026 /wiki/mysql/choose-something-else.md | |
| parent | ba91ce42f5c1e404dca5ffde503aece1b4df7f09 (diff) | |
I missed an entire bullet point last commit.
Diffstat (limited to 'wiki/mysql/choose-something-else.md')
| -rw-r--r-- | wiki/mysql/choose-something-else.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/wiki/mysql/choose-something-else.md b/wiki/mysql/choose-something-else.md index bfe4b3f..1443ad1 100644 --- a/wiki/mysql/choose-something-else.md +++ b/wiki/mysql/choose-something-else.md @@ -290,3 +290,17 @@ brains, and time: implemented using [server-side variables and side effects during `SELECT`](http://stackoverflow.com/questions/6473800/assigning-row-rank-numbers). What? Good luck understanding that code in six months. +* Even interesting joins run into trouble. MySQL's query planner has trouble + with a number of cases that can easily arise in well-normalized data: + * Joining and ordering by rows from multiple tables often forces MySQL to + dump the whole join to a temporary table, then sort it -- awful, + especially if you then use `LIMIT BY` to paginate the results. + * `JOIN` clauses with non-trivial conditions, such as joins by range or + joins by similarity, generally cause the planner to revert to table + scans even if the same condition would be indexable outside of a join. + * Joins with `WHERE` clauses that span both tables, where the rows + selected by the `WHERE` clause are outliers relative to the table + statistics, often cause MySQL to access tables in suboptimal order. + +And now you know why MySQL advocates are such big fans of doing data +_processing_ in "the client" or "the app". |
