Open tuky opened 2 months ago
Hi!
Yeah, we could add such an index class here. It seems to be MySQL/MariaDB specific, so less suitable for Django core, which only has django.contrib.postgres
.
Rough plan to get it ready for merging:
django_mysql.models.indexes
.If you have time for this, that would be great!
Description
Heyo!
See my ticket https://code.djangoproject.com/ticket/35777. It seems to me, that django lacks support to create indexes with so-called "Column Prefix Key Parts". These are documented here: https://dev.mysql.com/doc/refman/8.4/en/create-index.html#create-index-column-prefixes and give you a huge performance boost, because these indexes can then be used for
istartswith
queries onTEXT
fields. Would this be something for django itself or should this be rather implemented here? How would you evaluate my workaround from the django ticket?