From: Joshua D. Drake <jd@commandprompt.com>
To: Michael Stone <mstone+postgres@mathom.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Best way to index IP data?
Date: Fri, 11 Jan 2008 16:57:46 -0800
Message-ID: <20080111165746.5e3fd8e3@commandprompt.com> (raw)
In-Reply-To: <20080112003600.GA5294@mathom.us>
References: <200801101614.54729.kevin@kevinkempterllc.com>
<DA6DE53A-2F69-46F3-8C96-B341ADCDDFAF@blighty.com>
<36e682920801101541o7626bbddj428617144240c554@mail.gmail.com>
<Pine.LNX.4.64.0801111025390.30762@localhost>
<13179.1200064791@sss.pgh.pa.us>
<20080111162747.GT5294@mathom.us>
<24044.1200082058@sss.pgh.pa.us>
<20080111212703.GU5294@mathom.us>
<28651.1200097150@sss.pgh.pa.us>
<20080112003600.GA5294@mathom.us>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 11 Jan 2008 19:36:02 -0500
Michael Stone <mstone+postgres@mathom.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-----
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: jd@commandprompt.com, mstone+postgres@mathom.us, tgl@sss.pgh.pa.us
Subject: Re: Best way to index IP data?
In-Reply-To: <20080111165746.5e3fd8e3@commandprompt.com>
* 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