title: How to use mysql query optimzer hints in Yii2?
body: <p>I've stumbled upon the <code>optimizer hints</code> MySQL feature <a href="https://dev.mysql.com/doc/refman/8.0/en/optimizer-hints.html" rel="nofollow noreferrer">here</a> that I did not know existed and tried to figure out how to use this with <code>Yii2</code>.</p>
  <p>MySQL supports setting specific options by using <code>optimizer hints</code>, e.g.:</p>
  <pre><code>SELECT /*+ NO_RANGE_OPTIMIZATION(t3 PRIMARY, f2_idx) */ f1
    FROM t3 WHERE f1 &gt; 30 AND f1 &lt; 33;
  SELECT /*+ BKA(t1) NO_BKA(t2) */ * FROM t1 INNER JOIN t2 WHERE ...;
  SELECT /*+ NO_ICP(t1, t2) */ * FROM t1 INNER JOIN t2 WHERE ...;
  SELECT /*+ SEMIJOIN(FIRSTMATCH, LOOSESCAN) */ * FROM t1 ...;
  EXPLAIN SELECT /*+ NO_ICP(t1) */ * FROM t1 WHERE ...;
  SELECT /*+ MERGE(dt) */ * FROM (SELECT * FROM t1) AS dt;
  INSERT /*+ SET_VAR(foreign_key_checks=OFF) */ INTO t2 VALUES(2);
  </code></pre>
  <p>Is there <code>Yii2</code> native way of setting those <code>query hints</code>?</p>