You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 on TEXT 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?
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:
Add to django_mysql.models.indexes.
Add type hints.
Add tests. Some of the existing field and operations tests can be used for inspiration. We have 100% coverage here!
Add docs - a new page called "indexes" covering it, with the same level of detail as existing docs.
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?The text was updated successfully, but these errors were encountered: