Re: [NOVICE] Index scan on CIDR field ?

From: "D(dot) Duccini" <duccini(at)backpack(dot)com>
To: Margarit Nickolov <man(at)digsys(dot)bg>
Cc: pgsql-novice(at)postgreSQL(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [NOVICE] Index scan on CIDR field ?
Date: 1999-12-29 14:52:19
Message-ID: Pine.GSO.3.96.991229084945.3773A-100000@ra.bpsi.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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(at)backpack(dot)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!"
-----------------------------------------------------------------------------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Steven Pennie 1999-12-29 15:15:15 unsubscribe
Previous Message Margarit Nickolov 1999-12-29 08:52:49 Index scan on CIDR field ?