Re: POSTGRES DB 3 800 000 rows table, speed up? - Mailing list pgsql-general

From Andrew - Supernews
Subject Re: POSTGRES DB 3 800 000 rows table, speed up?
Date
Msg-id slrndrl4ae.2iki.andrew+nonews@atlantis.supernews.net
Whole thread Raw
In response to POSTGRES DB 3 800 000 rows table, speed up?  (Eugene <evgenius@hot.ee>)
List pgsql-general
On 2005-12-27, Eugene <evgenius@hot.ee> wrote:
> I've indexed first two columns they are IPfrom, IPto also table is btree
> version of postgre is 7.4.8, on hosting
> I ask db like this  SELECT * FROM ipdb2 WHERE '3229285376' BETWEEN ipfrom
> AND ipto;
>
> and get answer after 3-10 seconds, is there a way to speed it up somehow?
> any tweaks and tuneups possible with it?

http://pgfoundry.org/projects/ip4r

Designed specifically for storing IP ranges as in your example, it will
(if correctly used) reduce that query time down to a few milliseconds.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

pgsql-general by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: generic way to retrieve array as rowset
Next
From: "A. Kretschmer"
Date:
Subject: Re: generic way to retrieve array as rowset