Is there a good way in Django models to specify a specific type of index store?
For example, the default storage type for MySQL is BTREE, when it can be more efficient for my particular column to have a HASH (hash table) as the storage type.
I cannot find a good way without creating a custom field or modifying the django kernel that will do this for me. I can also do this by changing the index after creating the table.
This situation probably doesn’t matter for most things, but there are situations when the hash table is a more efficient search mechanism, and, of course, if sorting by column is not needed or it does not make sense. For example, a column with randomly generated data usually does not make a reasonable ordering of information (unless you are looking for a repeatable random type, but this does not apply to the point).
Kekoa source
share