Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0BGHnB43429 for ; Fri, 11 Jan 2002 11:17:49 -0500 (EST) (envelope-from nickf@ontko.com) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id LAA05933; Fri, 11 Jan 2002 11:17:40 -0500 X-Authentication-Warning: shire.ontko.com: Host bilbo.ontko.com [199.164.165.101] claimed to be nick Reply-To: From: "Nick Fankhauser" To: "Frank Bax" Cc: "Guru\(External\)" , Subject: Re: Resources Date: Fri, 11 Jan 2002 11:13:58 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <3.0.6.32.20020111110937.02289430@pop6.sympatico.ca> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Archive-Number: 200201/87 X-Sequence-Number: 6176 > I don't beleive indexes will improve SELECT using LIKE. I wondered about that too, so I did a test using a database I'm working with. The results indicate that it helps substantially- here is my terminal log file: staging=# staging=# staging=# explain select count(*) from actor where actor_full_name like 'A%'; NOTICE: QUERY PLAN: Aggregate (cost=1067.72..1067.72 rows=1 width=0) -> Seq Scan on actor (cost=0.00..1066.29 rows=572 width=0) EXPLAIN staging=# create index test on actor(actor_full_name); CREATE staging=# explain select count(*) from actor where actor_full_name like 'A%'; NOTICE: QUERY PLAN: Aggregate (cost=577.46..577.46 rows=1 width=0) -> Index Scan using test on actor (cost=0.00..576.03 rows=572 width=0) EXPLAIN staging=# -Nick -------------------------------------------------------------------------- Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/