Re: [GENERAL] Creating indexes?

2010-04-23 Thread Adrian von Bidder
On Thursday 22 April 2010 23.36:51 Bjørn T Johansen wrote: > 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? This depends on the queries you run against the table. It's not possible to give a genera

Re: [GENERAL] Creating indexes?

2010-04-22 Thread Martin Gainty
eral@postgresql.org > Subject: [GENERAL] Creating indexes? > > 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

Re: [GENERAL] Creating indexes?

2010-04-22 Thread Greg Smith
Bjørn T Johansen wrote: 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 f

[GENERAL] Creating indexes?

2010-04-22 Thread Bjørn T Johansen
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 com

Re: [GENERAL] Creating indexes

2007-12-10 Thread Scott Marlowe
On Dec 10, 2007 10:53 AM, Robert Fitzpatrick <[EMAIL PROTECTED]> wrote: > I have a PHP 5 app using pgsql 8.2 and a HTML table of clients now grown > to almost 10,000 loading 25 per page. There is a filter feature atop all > seven columns in the table listing (all varchar except one date column). >

Re: [GENERAL] Creating indexes

2007-12-10 Thread André Volpato
Robert Fitzpatrick escreveu: I have a PHP 5 app using pgsql 8.2 and a HTML table of clients now grown to almost 10,000 loading 25 per page. There is a filter feature atop all seven columns in the table listing (all varchar except one date column). Also, sorting can be done by clicking any column

Re: [GENERAL] Creating indexes

2007-12-10 Thread Matthew T. O'Connor
Robert Fitzpatrick wrote: Now my question, would it be better to create one index with all columns in the table -or- a separate index for each column field? I was assuming the latter, but would the index with all columns be beneficial as well? Generally it's much better to have an index deal w

[GENERAL] Creating indexes

2007-12-10 Thread Robert Fitzpatrick
I have a PHP 5 app using pgsql 8.2 and a HTML table of clients now grown to almost 10,000 loading 25 per page. There is a filter feature atop all seven columns in the table listing (all varchar except one date column). Also, sorting can be done by clicking any column header. Some complain of speed