#35777: MySQL: cannot add key limited index on TEXT columns
-------------------------------+--------------------------------------
     Reporter:  Tobias Krönke  |                    Owner:  (none)
         Type:  Uncategorized  |                   Status:  closed
    Component:  Migrations     |                  Version:  5.0
     Severity:  Normal         |               Resolution:  invalid
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Comment (by Tobias Krönke):

 Replying to [comment:1 Sarah Boyce]:
 > I feel this functionality exists and the way to go about this might be
 using
 
[https://docs.djangoproject.com/en/5.0/ref/models/indexes/#django.db.models.Index.expressions
 Index.expressions] and [https://docs.djangoproject.com/en/5.0/ref/models
 /database-functions/#left Left]

 Thx. Unfortunately, your feeling is not accurate. Your suggestion results
 in the same index created as my 3rd approach in the OP. That index however
 is useless. It cannot be used by MySQL for speeding up `startswith`
 queries.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35777#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701920fdbd8ec-e9aefff3-9a45-4c62-a11c-0cc5d6f0fe91-000000%40eu-central-1.amazonses.com.

Reply via email to