Answer the question
In order to leave comments, you need to log in
How to use Postgres functional indexes from Django?
There are functional indexes
in postgres
Viewer doc:
https://docs.djangoproject.com/es/1.10/ref/contrib...
There seems to be nothing like that.
Is there an app for this?
Now it only comes to mind to write a raw query in the migration, but this is some kind of terrible crutch.
Answer the question
In order to leave comments, you need to log in
Dzhanga does not have the ability to:
Specify the index type (HASH, BTREE, BRIN, GIN, GIST). BTREE only.
Create functional indexes
Create partial indexes
Only crutch pure SQL in migrations.
This is not a crutch, but quite an adequate solution.
Query optimization and indexes are the database side.
It's perfectly fine to go ahead and create indexes on the table/columns that your application uses the most. Actually, this is why such a profession as a database administrator lives and thrives.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question