#36475: Optimize F-expression slice to MySQL column-prefix index
-------------------------------------+-------------------------------------
     Reporter:  JaeHyuckSa           |                    Owner:  (none)
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  5.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

 * resolution:   => needsinfo
 * status:  new => closed

Comment:

 Unless I have misunderstood, which is very possible, I don't see how this
 can be implemented without a new index class like `PrefixIndex` which was
 suggested within #35777 and I see is what you have written for django-
 mysql

 Slicing an `F` expression of a `CharField` resolves to a `Substr`
 expression. The MySQL syntax `col_name(length)` is (from what I can tell)
 is index specific and so not we won't be able to override the sql for
 MySQL within `Substr`. In the PR discussion you mentioned overriding
 `_create_index_sql` but I can't envision what you are thinking. If you
 have a draft PR to propose this I might be able to see what you mean?

 Note that #16460 is almost a duplicate
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36475#comment:3>
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 visit 
https://groups.google.com/d/msgid/django-updates/010701979d23f9ed-a58dc9bd-0d36-4b75-915d-b6aa8d4a0fb0-000000%40eu-central-1.amazonses.com.

Reply via email to