Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Bit of both.

Previously, you could indicate you wanted an index on a field, but only on a single field, and you did it in the field definition.

Declaring them in Meta via the Index class is new, as is the multi-field support and direction support. More importantly, you can subclass Index to define other types of indices besides the default (which is btree). For example, Django now ships built-in subclasses to do BRIN and GIN on Postgres.



Is there anywhere django docs on how to actually use the brin/gin indexes? All I can find is that they exist...



single field?

what about `unique_together` and `index_together`?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: