Re: [GENERAL] Questions about indexes

2006-06-11 Thread Andreas Kretschmer
Alan Hodgson <[EMAIL PROTECTED]> schrieb: > On Saturday 10 June 2006 13:30, "Pat Maddox" <[EMAIL PROTECTED]> wrote: > > 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

Re: [GENERAL] Questions about indexes

2006-06-10 Thread Alan Hodgson
On Saturday 10 June 2006 13:30, "Pat Maddox" <[EMAIL PROTECTED]> wrote: > 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 ge

Re: [GENERAL] Questions about indexes

2001-05-09 Thread Frank Bax
At 11:10 AM 5/9/01 +0200, DaVinci wrote: >On Wed, May 09, 2001 at 10:31:27AM +0200, Renaud Thonnart wrote: >> How can I delete them in keeping integrity in the database? > > drop index?... Dropping the index will not maintain the PK integrity... http://www.ca.postgresql.org/users-lounge/docs/7.1

Re: [GENERAL] Questions about indexes

2001-05-09 Thread Renaud Thonnart
Thank you for your explaination, David ! Renaud THONNART ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Questions about indexes

2001-05-09 Thread DaVinci
On Wed, May 09, 2001 at 10:31:27AM +0200, Renaud Thonnart wrote: > Does PostgreSQL create an index when a table is created? Yes, with PK. > Does it create index even if there is no PK for this table? No. > I know that indexes increase performance for SELECT but it is the > contrary when IN