
Efficient Use of PostgreSQL Indexes - craigkerstiens
https://devcenter.heroku.com/articles/postgresql-indexes
======
nierman
Using gist indices for exclusion constraints (added in pg 9.0) can be pretty
useful also.

The Postgres docs show a simple example that enforces the constraint "no two
rows in the table contain overlapping circles" (&& is the overlaps operator
for geometric types):

    
    
      CREATE TABLE circles (
        c circle,
        EXCLUDE USING gist (c WITH &&)
      );
    

[http://www.postgresql.org/docs/9.1/static/ddl-
constraints.ht...](http://www.postgresql.org/docs/9.1/static/ddl-
constraints.html#DDL-CONSTRAINTS-EXCLUSION)

