Creating indexes?

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Creating indexes?
Date: 2010-04-22 21:36:51
Message-ID: 20100422233651.10d5d2b9@pennywise.havleik.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

What is the best approach for PostgreSQL when creating indexes? E.g I have two fields in a table that I want indexed, is it best to create one index
combining the two fields or creating one for each field? If I create one for each field, will the search when using both fields be slower that a
combined index?

Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj(at)havleik(dot)no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2010-04-22 21:53:02 Re: Creating indexes?
Previous Message Jonathan Vanasco 2010-04-22 21:10:28 Re: trying to write a bit of logic as one query, can't seem to do it under 2