Skip site navigation (1) Skip section navigation (2)

Re: ip address data type

From: Steve Atkins <steve(at)blighty(dot)com>
To: "Pgsql-Performance ((E-mail))" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: ip address data type
Date: 2006-04-24 23:40:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Apr 24, 2006, at 3:45 PM, Sriram Dandapani wrote:

> Hi
> I have queries that use like operators and regex patterns to  
> determine if an ip address is internal or external (this is against  
> a table with say 100 million distinct ip addresses).
> Does the inet data type offer comparison/search performance  
> benefits over plain text for ip addresses..
It's probably better than text-based, but it's hard to be worse than  
regex and like.

Depending on your exact needs may be
interesting, and I've also found pretty good behavior by mapping an IP
address onto a 2^31 offset integer.


In response to

pgsql-performance by date

Next:From: Mark KirkwoodDate: 2006-04-24 23:57:34
Subject: Re: Hardware: HP StorageWorks MSA 1500
Previous:From: Jim C. NasbyDate: 2006-04-24 22:48:37
Subject: Re: ip address data type

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group