Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g11Dxrl69503 for ; Fri, 1 Feb 2002 08:59:53 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id g11DbkQ55870 for pgsql-sql@postgresql.org; Fri, 1 Feb 2002 08:37:46 -0500 (EST) (envelope-from news) From: "Steve Brett" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Index Management Date: Fri, 1 Feb 2002 13:32:36 -0000 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 40 Message-ID: References: <87d6zr1fdm.fsf@localhost.localdomain> X-Complaints-To: news@hub.org X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: pgsql-sql@postgresql.org X-Archive-Number: 200202/5 X-Sequence-Number: 6437 AFAIK the indeces are chosen by the query optimiser and used whenever they are needed. sometimes if the optimiser decides it may not use an index if there are a small number of rows in the table and sequential scan would be as fast. a general rule of thumb i use is that indexes are placed on tables if i have a query that uses that attribute in the where clause. Steve "Paulo J. Matos" wrote in message news:87d6zr1fdm.fsf@localhost.localdomain... > Hi all, > > I've been creating indeces for my tables but I'm a bit lost > now. I'd like to know how indeces are managed? Are them > autommaticly chosen for a particular query? We choose the good > ones (maybe through a sql command)? > If I create 10 indeces and then I make some queries, how will > postgres manage the indeces and how to work through the queries? > > Best regards, > > -- > Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt > Instituto Superior Tecnico - Lisbon > Software & Computer Engineering - A.I. > - > http://www.rnl.ist.utl.pt/~pocm > --- > Yes, God had a deadline... > So, He wrote it all in Lisp! > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly