#23139: mysql backend should use CHAR instead of VARCHAR if model has a 
CharField
of fixed length.
----------------------------------------------+--------------------
     Reporter:  dnozay                        |      Owner:  nobody
         Type:  Uncategorized                 |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.6
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 see as well https://code.djangoproject.com/ticket/23138 which asks for
 min_length to be added to `models.fields.Field`.

 For optimization purposes, if I have a model that wants exactly N
 characters for a field, then `CHAR` uses less bytes than `VARCHAR`.
 One way to detect that intent is if you have `CharField(min_length=N,
 max_length=N)` -- in other words `min_length == max_length`.

 common example: a hash always has the same length (always?).

 https://github.com/django/django/pull/2921

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23139>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.3ea9a2f3be4a40f47fec65c46ee77e8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to