|
At my PHP-shop company, most projects are limited to MySQL 5.7 (legacy reason, dependency reason, boss-likes-MySQL reason...). They are all handicapped by MySQL featureset, and can't update to 8 yet. If they had used Postgres some years ago, they would get: - JSON column (actually MySQL 5.6 supports it but I doubt if it's as good as Postgres) - Window functions (available in MySQL 8x only, while this has been available since Postgres 9x) - Materialized views, views that is physical like a table, can be used to store aggregated, pre-calculated data like sum, count... - Indexing on function expression - Better query plan explanation |
For indexing on function expressions in particular, the workaround we use is to add a generated column and index that.