skip to Main Content

MySql group by is slow

I have a scenario whereby I am trying to fetch a user's most recent messages from over 2 million rows and group them by their parent (or thread) id. However, this grouping is causing the query time to be around…

VIEW QUESTION

MySQL Derived column not recognized as functionally dependent

With the following table: CREATE TABLE `Example` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `properties` json DEFAULT NULL, `hash` binary(20) GENERATED ALWAYS AS (unhex(sha(`properties`))) STORED, PRIMARY KEY (`id`), KEY `hash` (`hash`) ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; the column hash…

VIEW QUESTION
Back To Top
Search