Re: [PERFORM] int4 vs varchar to store ip addr

2007-02-01 Thread Michael Artz
On 1/30/07, Pomarede Nicolas <[EMAIL PROTECTED]> wrote: On Mon, 29 Jan 2007, Florian Weimer wrote: > * Pomarede Nicolas: > >> I could use PG internal inet/cidr type to store the ip addrs, which >> would take 12 bytes per IP, thus gaining a few bytes per row. > > I thought it's down to 8 bytes in

Re: [PERFORM] int4 vs varchar to store ip addr

2007-01-30 Thread Pomarede Nicolas
On Mon, 29 Jan 2007, Florian Weimer wrote: * Pomarede Nicolas: I could use PG internal inet/cidr type to store the ip addrs, which would take 12 bytes per IP, thus gaining a few bytes per row. I thought it's down to 8 bytes in PostgreSQL 8.2, but I could be mistaken. Apart from gaining som

Re: [PERFORM] int4 vs varchar to store ip addr

2007-01-29 Thread Cosimo Streppone
Nicolas wrote: I have an authorization table that associates 1 customer IP to a service IP to determine a TTL (used by a radius server). table auth client varchar(15); service varchar(15); ttl int4; client and service are both ip addr. The number of distinct clients can be rather large (sa

Re: [PERFORM] int4 vs varchar to store ip addr

2007-01-29 Thread Florian Weimer
* Pomarede Nicolas: > I could use PG internal inet/cidr type to store the ip addrs, which > would take 12 bytes per IP, thus gaining a few bytes per row. I thought it's down to 8 bytes in PostgreSQL 8.2, but I could be mistaken. > Apart from gaining some bytes, would the btree index scan be fast