ApiQueryLogEvents: Add IGNORE INDEX to avoid MariaDB optimizer bug
The optimizer in MariaDB 10.1.37 and 10.1.38 seems to wildly
underestimate the cost of using the times index and overestimate the
cost of using the user_time or actor_time indexes, leading to it
choosing a plan that may have to fetch and filesort 10000000s of rows
versus the 10s or 1000s fetched with no filesort if it used the correct
We can get it to use the correct index by having it ignore times, and
this also won't interfere with it choosing log_user_type_time,
log_actor_type_time, or other more specific indexes in cases where
those would be more appropriate.
As usual, this should be reviewed as MySQL/MariaDB versions used are
updated and removed if the optimizer is fixed.