Changes between Initial Version and Version 1 of Ticket #28038, comment 3
- Timestamp:
- Apr 6, 2017, 7:50:34 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28038, comment 3
initial v1 1 1 It's a shame we expose builtin lookups such as `__icontains` on these kind of fields as it produces really inefficient SQL, a real footgun API if you ask me. 2 2 3 I think we'd be doing developers a favor in erroring instead and forcing them to choose an implementation that best fit their need. That is using something along `EXISTS(SELECT 1 FROM unnest(array_field) key WHERE UPPER(key) = UPPER( key))` on small datasets or relying on a [http://stackoverflow.com/a/16019599/70191 GIN indexed functional lookup instead] on large ones.3 I think we'd be doing developers a favor in erroring instead and forcing them to choose an implementation that best fit their need. That is using something along `EXISTS(SELECT 1 FROM unnest(array_field) key WHERE UPPER(key) = UPPER('lookup'))` on small datasets or relying on a [http://stackoverflow.com/a/16019599/70191 GIN indexed functional lookup instead] on large ones. 4 4 5 5 Anyway, here's the [https://github.com/django/django/pull/8317 PR].