There are a number of variables that allow a DBA to tune a PostgreSQL database server for specific loads, disk types and hardware. These are fondly called the GUCS (Global Unified Configuration Settings) and you can take a look via the pg_settings view. There are also a few of things that you can do in your application to get the most out of Postgres:
Know the postgres index types
By default CREATE INDEX will create B-tree indexes which will serve well for most cases where we use equality, inequality and range operators. However there are cases where you can build different indexing strategies with GiST (Generalized Search Tree) indexes. For example, Postgres ships with built in GiST operator classes for geometric operators — for dealing with the geometric types like point, box, polygon, circle, and others. There are more interesting GiST index examples in the contrib packages for things like textual search, tree structures, and more.
Read more: GIANT ROBOTS
Know the postgres index types
By default CREATE INDEX will create B-tree indexes which will serve well for most cases where we use equality, inequality and range operators. However there are cases where you can build different indexing strategies with GiST (Generalized Search Tree) indexes. For example, Postgres ships with built in GiST operator classes for geometric operators — for dealing with the geometric types like point, box, polygon, circle, and others. There are more interesting GiST index examples in the contrib packages for things like textual search, tree structures, and more.
Read more: GIANT ROBOTS