#24088: Why is operator class used by default for PostgreSQL indexes on char & 
text
field
-------------------------------+--------------------
     Reporter:  djbug          |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 [https://code.djangoproject.com/ticket/12234 Bug report 12234] modified
 the index for char & text fields in PostgreSQL to use operator class
 `varchar_pattern_ops` & `text_pattern_ops` respectively. This makes the
 index usable for `LIKE` queries.

 However there isn't any discussion on the additional cost associated with
 making this as the default option. It would have been a good optional
 feature. Consider the `username` column in `user` table. How often do we
 need to do `LIKE` queries on this.

 But if this needs to be maintained for backwards compatibility, there
 should be an option to get a vanilla index (without `*_pattern_op` class)
 if the column will be used for simple lookups of the type`WHERE name =
 'abc'`

--
Ticket URL: <https://code.djangoproject.com/ticket/24088>
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/048.cb85765e8c3ba5a61ee4acf407b6edc8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to