Questions about indexes

From: "Pat Maddox" <pergesu(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Questions about indexes
Date: 2006-06-10 20:30:46
Message-ID: 810a540e0606101330m425c8195r6632acf0c58a7e78@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've got a table with that has 5 fields. Nearly every query I make to
this table is of the form
SELECT * FROM table1 WHERE field1='foo' AND field2=7;

It's always those two exact fields. How should I index this to get
the best performance?

Also, how can I find what other parts of my app would benefit from more indexes?

Thanks,
Pat

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2006-06-10 21:10:06 Re: TOAST not working
Previous Message A. Kretschmer 2006-06-10 20:29:00 Re: Logging and Viewing SQL History