#36690: Use case for EXTRA()
------------------------------+-----------------------------------------
Reporter: gleake-reorg | Type: Uncategorized
Status: new | Component: Uncategorized
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Django's ORM leverages UPPER() and casts to text `UPPER(...)::text` when
doing a case insensitive search. This is not adequately performant for our
use case, and loses the use of an index due to the UPPER() call. The
`extra()` function allows me to explicitly make a case insensitive ILIKE
call on postgres.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36690>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.