Received: from ra.bpsi.net (ra.bpsi.net [199.199.134.1]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA83627; Wed, 29 Dec 1999 09:52:38 -0500 (EST) (envelope-from duccini@bpsi.net) Received: (from duccini@localhost) by ra.bpsi.net (8.9.0/8.9.0) id IAA03956; Wed, 29 Dec 1999 08:52:19 -0600 (CST) Date: Wed, 29 Dec 1999 08:52:19 -0600 (CST) From: "D. Duccini" X-Sender: duccini@ra.bpsi.net Reply-To: "D. Duccini" To: Margarit Nickolov cc: pgsql-novice@postgreSQL.org, pgsql-sql@postgreSQL.org Subject: Re: [NOVICE] Index scan on CIDR field ? In-Reply-To: <199912290846.KAA19677@school.digsys.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII did you create an index? create index_name on tablename (row_name); you would also get one automatically if when you created the table you'd made that row a PRIMARY KEY -duck On Wed, 29 Dec 1999, Margarit Nickolov wrote: > I created index on CIDR field on table with about 1 000 000 rows, made > 'vacuum analyze', but exlain told me that sequental scan is done > on query like that SELECT * FROM table WHERE ipaddr='212.129.92.1' > > I'm using PostgreSQL 6.5.1. I need a index scan. Do I miss something ? > Margarit. > > > ************ > ----------------------------------------------------------------------------- david@backpack.com BackPack Software, Inc. www.backpack.com +1 651.645.7550 voice "Life is an Adventure. +1 651.645.9798 fax Don't forget your BackPack!" -----------------------------------------------------------------------------