Re: POSTGRES DB 3 800 000 rows table, speed up?

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: POSTGRES DB 3 800 000 rows table, speed up?
Date: 2006-01-03 14:59:26
Message-ID: slrndrl4ae.2iki.andrew+nonews@atlantis.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2005-12-27, Eugene <evgenius(at)hot(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-01-03 15:10:44 Re: generic way to retrieve array as rowset
Previous Message Arnaud Lesauvage 2006-01-03 14:43:08 initdb: invalid locale name