ALTER TABLE mt_activity ADD INDEX idx_ids( ( CAST( suit_ids -> '$.buId' AS UNSIGNED array ) ) );
ALTER TABLE mt_activity ADD INDEX idx_suit_ids( ( CAST( suit_ids -> '$[*].buId' AS UNSIGNED array ) ) );
查询语句
EXPLAIN select * from mt_activity where JSON_CONTAINS(suit_ids -> '$[*].buId', '11')
EXPLAIN select * from mt_activity where JSON_OVERLAPS(suit_ids -> '$[*].buId', '[11,12,33]')