pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Barr <nicky@chuckie.co.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Eric Jain <Eric.Jain@isb-sib.ch>
Cc: Steve Atkins <steve@blighty.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Slow join using network address function
Date: Tue, 24 Feb 2004 16:44:57 +0000
Message-ID: <403B7F89.5030902@chuckie.co.uk> (raw)
In-Reply-To: <22239.1077636202@sss.pgh.pa.us>
References: <000701c3fa02$e4e3d180$c300000a@caliente>
	<20040223160734.GA11052@gp.word-to-the-wise.com>
	<001d01c3face$bca62d40$c300000a@caliente>
	<22239.1077636202@sss.pgh.pa.us>

Tom Lane wrote:

>"Eric Jain" <Eric.Jain@isb-sib.ch> writes:
>  
>
>>><http://word-to-the-wise.com/ipr.tgz; is a datatype that contains 
>>>a range of IPv4 addresses, and which has the various operators to 
>>>make it GIST indexable.
>>>      
>>>
>
>  
>
>>Great, this looks very promising.
>>    
>>
>
>  
>
>>>No cast operators between ipr and inet types.
>>>      
>>>
>
>  
>
>>Any way to work around this, short of dumping and reloading tables?
>>    
>>
>
>Wouldn't it be better to implement the GIST indexing operators of that
>package on the standard datatypes?  It wasn't apparent to me what "range
>of IP addresses" does for you that isn't covered by "CIDR subnet" for
>real-world cases.
>
>			regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>  
>
We currently only allow access to one of our apps based on IP address. 
These IPs are stored one per row in a single table, but often represent 
a contiguous piece of IP space, but does not represent a full subnet. 
The current CIDR subnet has the limitation that it will only allow full 
subnets, i.e. every IP address in 192.168.1.0/24. For example:

192.168.1.15 -> 192.168.1.31

This range cannot be represented by a CIDR subnet, or it might be able 
to but I really dont want to figure it out each time. However this new 
type allows us to store this range as one row. It allows an arbitrary 
range of IP addresses, not just those in a specific subnet. I would see 
this as a useful inclusion whether in the main src tree or in contrib 
and we will probably be using it when we get to "mess" with the database 
schema for this app in the next few months, in fact I have already 
inserted it into our PG source tree ;-).

Nick

P.S. We are not responsible for the IP address ranges, we just get told 
what they are.







view thread (10+ messages)  latest in thread

Message-ID: <403B7F89.5030902@chuckie.co.uk>
Permalink:  ../403B7F89.5030902@chuckie.co.uk/
Also on:    postgresql.org/message-id/403B7F89.5030902@chuckie.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: nicky@chuckie.co.uk, tgl@sss.pgh.pa.us, Eric.Jain@isb-sib.ch, steve@blighty.com
  Subject: Re: Slow join using network address function
  In-Reply-To: <403B7F89.5030902@chuckie.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox