Received: from mail.iinet.net.au (symphony-04.iinet.net.au [203.59.3.36]) by postgresql.org (Postfix) with SMTP id 5DB6947591D for ; Wed, 24 Jul 2002 11:53:21 -0400 (EDT) Received: (qmail 16995 invoked by uid 666); 24 Jul 2002 15:46:21 -0000 Received: from unknown (HELO SOL) (203.59.159.120) by iinet.net.au with SMTP; 24 Jul 2002 15:46:21 -0000 Message-ID: <001801c23329$82b8a590$0200a8c0@SOL> From: "Christopher Kings-Lynne" To: "Elielson Fontanezi" , "'Daryl Herzmann'" Cc: "pgsql-sql" , "pgsql-general" References: Subject: Re: [SQL] Queries not using Index Date: Wed, 24 Jul 2002 23:48:08 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200207/1478 X-Sequence-Number: 27965 > This SELECT causes a sequention scan 'cause your index > is not HASH type, but likely a BTREE one. > BTREE index is to interval searches (station = 'SAMI4%') > not precise searchs. (station = 'SAMI4'). In Postgres, the hash index is slow and inefficient (it's a bit better in7.3), and I believe btree is generally recommended over hash even for '=' instances. Chris