From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Michael Stone <mstone+postgres(at)mathom(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Best way to index IP data? |
Date: | 2008-01-12 00:57:46 |
Message-ID: | 20080111165746.5e3fd8e3@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 11 Jan 2008 19:36:02 -0500
Michael Stone <mstone+postgres(at)mathom(dot)us> wrote:
> On Fri, Jan 11, 2008 at 07:19:10PM -0500, Tom Lane wrote:
> >It was correct, but not as of 8.3. Considering you could save a
> >whole one byte by not storing the netmask
>
> Hmm. One for the netmask, plus the other two mystery bytes. :-) A
> byte here and a byte there is fine. 20% of a few billion IPs does
> start to add up.
About a 65.00 hard disk:
select pg_size_pretty((500000000000 * 0.2)::bigint);
pg_size_pretty
- ----------------
93 GB
But wumpf... that is a lot of ip addresses. Question is.. are you going
to have a few billion IPs in your database? Doubtful.
Sincerely,
Joshua D. Drake
>
> Mike Stone
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 9: In versions below 8.0,
> the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
- --
The PostgreSQL Company: Since 1997, http://www.commandprompt.com/
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
SELECT 'Training', 'Consulting' FROM vendor WHERE name = 'CMD'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHiBCMATb/zqfZUUQRAotjAJ4r6kjuO8pOZzD316Va1AE8VNt6TgCggQcT
lI/kT2DF59Zuu7cbipdBpPI=
=/xl5
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Stone | 2008-01-12 01:04:25 | Re: Best way to index IP data? |
Previous Message | Tom Lane | 2008-01-12 00:51:19 | Re: Best way to index IP data? |