CREATE TABLE t1 (
pk INT AUTO_INCREMENT PRIMARY KEY,
col_int_nokey INT NULL,
col_int_key INT AS (col_int_nokey) VIRTUAL,
KEY (col_int_key)
);
INSERT INTO t1 (col_int_nokey)
VALUES (0), (5), (4), (3), (7), (42), (5), (0), (3);
SELECT * FROM t1 WHERE col_int_key IN (3, 4) AND col_int_key <= 83 ORDER BY 1;
pk col_int_nokey col_int_key 344 433 933 set optimizer_switch='index_condition_pushdown=off';
SELECT * FROM t1 WHERE col_int_key IN (3, 4) ORDER BY 1;
pk col_int_nokey col_int_key 344 433 933
SELECT * FROM t1 WHERE col_int_key IN (3, 4) AND col_int_key <= 83 ORDER BY 1;
pk col_int_nokey col_int_key 344 433 933
DROP TABLE t1;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.