JSON Indexes & Generated Columns
Learn JSON Indexes & Generated Columns (JSON in MySQL, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction A JSON column cannot be indexed directly. You index a generated column (a column computed from an expression such as doc->>'$.email' ), or use a functional index on an expression, or a multi-valued index (8.0.17+) that indexes every element of a JSON array. A VIRTUAL generated column is computed on read; a STORED one is written to disk.