Remove STRAIGHT_JOIN from ApiQueryLogEvents
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 25 Feb 2014 15:04:30 +0000 (10:04 -0500)
committerSpringle <springle@wikimedia.org>
Wed, 26 Feb 2014 00:45:04 +0000 (00:45 +0000)
commit893efc8ff0efd29ccc8c5e96be0527d31fc5451e
treecd5073906f0a5c186777f27c1c1b3ac04e6ec369
parent89f4c930868346064b4046c7d08ccfa6fdd96cff
Remove STRAIGHT_JOIN from ApiQueryLogEvents

Per Sean Pringle:
> In all cases the STRAIGHT_JOIN forces an index scan on logging.times
> index, or more rarely a range access on logging.type_time index. Both
> query plans hit tens of millions of rows and take many minutes.
>
> Removing the STRAIGHT_JOIN allows the MariaDB query optimizer to
> choose a plan that takes seconds. Often it includes a filesort step,
> but more importantly it allows "index condition pushdown" which makes
> the filesort cheap.

Bug: 61889
Change-Id: Iad3905f29a2bdee1e3ebbfb2e1909b330faa8e81
includes/api/ApiQueryLogEvents.php