Re: Best way to index IP data?

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Best way to index IP data?
Дата
Msg-id 20080111165746.5e3fd8e3@commandprompt.com
обсуждение исходный текст
Ответ на Re: Best way to index IP data?  (Michael Stone <mstone+postgres@mathom.us>)
Ответы Re: Best way to index IP data?
Список pgsql-performance
-----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-----

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Best way to index IP data?
Следующее
От: Michael Stone
Дата:
Сообщение: Re: Best way to index IP data?