#22394: Several built in Lookups should actually be Transforms -------------------------------------+------------------------------------- Reporter: smeatonj | Owner: nobody Type: Uncategorized | Status: new Component: Database layer | Version: master (models, ORM) | Resolution: Severity: Normal | Triage Stage: Keywords: lookups | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by smeatonj):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Comment: Discussion on IRC mentions that the `Year` lookup does a range query (BETWEEN x AND y) which is able to use date based indexes. If a Transform were to be used, any field based indexes would be invalid, as a computed /function-based index would need to be created instead to preserve performance. However, all other operations based on date fields do an EXTRACT(), which can't use traditional indexes anyway. Having Year as a Lookup but the other date/time lookups as Transforms doesn't really make sense either, and would probably be more confusing than it is now. -- Ticket URL: <https://code.djangoproject.com/ticket/22394#comment:1> 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/066.0deb2945ae702f4140131c8167b6c2ec%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.