Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu [128.42.12.154]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA02346 for ; Wed, 11 Aug 1999 10:12:58 -0400 (EDT) (envelope-from reedstrm@wallace.ece.rice.edu) Received: by wallace.ece.rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgreSQL.org; Wed, 11 Aug 1999 09:12:57 -0500 (CDT) Date: Wed, 11 Aug 1999 09:12:57 -0500 From: "Ross J. Reedstrom" To: pgsql-sql@postgreSQL.org Cc: Clayton Cottingham Subject: Re: [SQL] quest:optimization with indexes Message-ID: <19990811091257.A2912@wallace.ece.rice.edu> References: <37B0AAE0.926AE58D@smartt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Herouth Maoz on Wed, Aug 11, 1999 at 04:30:13PM +0300 On Wed, Aug 11, 1999 at 04:30:13PM +0300, Herouth Maoz wrote: > At 01:42 +0300 on 11/08/1999, Clayton Cottingham wrote: > > > > where/what rules should be followed for setting up a good indexing > > scheme under pg? > One thing to add: after adding your index, vacuum analyze you table, or else the optimizer may thing you've only got a few rows in your table, and refuse to use the indices, because it thinks sequential scans are relatively cheap. Ross -- Ross J. Reedstrom, Ph.D., NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005