Skip to content

Instantly share code, notes, and snippets.

@GlassGruber
Created March 13, 2020 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GlassGruber/c1582170ca67551a6183df1a161e95b3 to your computer and use it in GitHub Desktop.
Save GlassGruber/c1582170ca67551a6183df1a161e95b3 to your computer and use it in GitHub Desktop.
sogist
/*
-- Executed querie(s) at 2020-03-12 16:48:02 took 0.078 s --
------------------------------------------------------------
EXPLAIN SELECT JSON_EXTRACT(j.acts, CONCAT('$[', i.n - 1, ']')) AS act,
j.len,
i.n
FROM
(SELECT scores.actions AS acts,
JSON_LENGTH(subs.actions) AS len
FROM `table_scores` AS scores) AS j
INNER JOIN ints AS i ON i.n BETWEEN 1 AND j.len
------------------------------------------------------------
*/
+------+-------------+--------+-------+---------------+---------+---------+------+--------+--------------------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+--------+-------+---------------+---------+---------+------+--------+--------------------------------------------------------------+
| 1 | SIMPLE | scores | ALL | NULL | NULL | NULL | NULL | 6 | |
| 1 | SIMPLE | i | range | PRIMARY | PRIMARY | 4 | NULL | 530258 | Using where; Using index; Using join buffer (flat, BNL join) |
+------+-------------+--------+-------+---------------+---------+---------+------+--------+--------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment