Re: index for inet column - Mailing list pgsql-hackers

From Christoph Moench-Tegeder
Subject Re: index for inet column
Date
Msg-id YsdY09CGh4T2uMPF@elch.exwg.net
Whole thread Raw
In response to index for inet column  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
## Zhihong Yu (zyu@yugabyte.com):

> I was able to create gin index on inet column in PG.
> 
> GIN is good with points/elements in sets. Is gin a good index for inet
> column ?
> It seems gist index would be better.

Why not use btree? The common operations are quite supported with that.
(Common operations being equality and subnet/CIDR matching, the latter
being a glorified less/greater than operation. If you are using non-
continous netmasks, you are already in a rather painful situation
networkwise and it will not get better in the database, so don't).

Regards,
Christoph

-- 
Spare Space



pgsql-hackers by date:

Previous
From: Zhihong Yu
Date:
Subject: index for inet column
Next
From: Nathan Bossart
Date:
Subject: Re: remove more archiving overhead