What's Changed
- Update phpstan/phpstan requirement from 2.2.7 to 2.2.8 by @dependabot[bot] in #1113
- Update rector/rector requirement from 2.6.1 to 2.6.2 by @dependabot[bot] in #1116
- Remove redundant indexes by @jonhassall in #1114
- Feature/remove redundant indexes (narrower indexes) by @jonhassall in #1115
- Update symplify/easy-coding-standard requirement from 13.2.17 to 13.2.18 by @dependabot[bot] in #1118
- Update phpstan/phpstan requirement from 2.2.8 to 2.2.9 by @dependabot[bot] in #1119
- docs: upgrade.md by @rez1dent3 in #1120
- Update rector/rector requirement from 2.6.2 to 2.6.3 by @dependabot[bot] in #1117
-
No code changes are required. Perform new package migrations;
-
Four redundant indexes are removed:
transactions.payable_type_payable_id_ind— a duplicate of themorphs()index;transactions.payable_type_ind— a prefix ofpayable_type_confirmed_ind;transactions.transactions_payable_type_payable_id_index— a prefix ofpayable_type_confirmed_ind;wallets.wallets_holder_type_holder_id_index— a prefix of the unique(holder_type, holder_id, slug);
-
Every removed index was a duplicate or a leading prefix of a wider one, so no query loses its access path.
EXPLAINon the hot wallet queries gives the same plans before and after (on mysql they are identical —
the optimizer usedpayable_confirmed_indanyway). Measured on 1M transactions and 200k wallets:mysql pgsql index size 685 → 329 MB (-52%) 265 → 156 MB (-41%) insert of 50k rows -63% time -32% time The gain is in write throughput and disk footprint, reads stay the same;
-
If you have a highload project, drop the indexes yourself
(pt-online-schema-change
for mysql,DROP INDEX CONCURRENTLYfor pgsql), then add both migration names to themigrationstable
so they are not executed again. For a small projectphp artisan migrateis enough;
New Contributors
- @jonhassall made their first contribution in #1114
Full Changelog: 12.0.5...12.1.0