#24088: text/varchar_pattern_ops on PostgreSQL could be optional -------------------------------------+------------------------------------- Reporter: djbug | Owner: nobody Type: New feature | Status: closed Component: Database layer | Version: master (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 -------------------------------------+-------------------------------------
Comment (by Tom Carrick): Replying to [comment:8 Jakub SzafraĆski]: > I think I have a valid use-case. > > I have a table with a large amount of rows - around 180,000,000, and increasing. I have one field that's considered a "grouping" field, but happens to be a VARCHAR field. > > I will never make a LIKE query on this field, because it contains mostly IDs (only stored as VARCHAR). But I am making a lot of `WHERE xxx = something` and `WHERE xxx in (something1, something2, ...)`. Therefore, the `varchar_pattern_ops` index will never be used in my case, but it takes a considerable amount of time to build up, when I'm mass-importing new data into this table. > > I hope this qualifies as a valid use-case - if it does, please reopen this issue. I assume this covers your use case now? https://docs.djangoproject.com/en/2.2/ref/models/indexes/#opclasses -- Ticket URL: <https://code.djangoproject.com/ticket/24088#comment:9> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.2153f36c540d1f9a62587d01f517b73d%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.