1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
django/docs/ref/contrib/postgres/indexes.txt
Mads Jensen e585c43be9 Fixed #25809 -- Added BrinIndex support in django.contrib.postgres.
Thanks Tim Graham and Markus Holtermann for review.
2017-01-15 13:37:18 +01:00

37 lines
1.1 KiB
Plaintext

=================================
PostgreSQL specific model indexes
=================================
.. module:: django.contrib.postgres.indexes
.. versionadded:: 1.11
The following are PostgreSQL specific :doc:`indexes </ref/models/indexes>`
available from the ``django.contrib.postgres.indexes`` module.
``BrinIndex``
=============
.. class:: BrinIndex(pages_per_range=None)
Creates a `BRIN index
<https://www.postgresql.org/docs/current/static/brin-intro.html>`_. For
performance considerations and use cases of the index, please consult the
documentation.
``GinIndex``
============
.. class:: GinIndex()
Creates a `gin index
<https://www.postgresql.org/docs/current/static/gin.html>`_.
To use this index on data types not in the `built-in operator classes
<https://www.postgresql.org/docs/current/static/gin-builtin-opclasses.html>`_,
you need to activate the `btree_gin extension
<https://www.postgresql.org/docs/current/static/btree-gin.html>`_ on
PostgreSQL. You can install it using the
:class:`~django.contrib.postgres.operations.BtreeGinExtension` migration
operation.