Skip site navigation (1) Skip section navigation (2)

Re: Slow indexscan

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mikko Partio <mpartio(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow indexscan
Date: 2007-06-20 17:54:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

I don't follow this thread, just see familiar spherical coordinates we
work with a lot. If you need fast radial query you can use our
q3c package available from See some details


On Wed, 20 Jun 2007, Tom Lane wrote:

> "Mikko Partio" <mpartio(at)gmail(dot)com> writes:
>>  Index Scan using tbl_20070601_pkey on tbl_20070601 t1
>> (cost=0.00..365.13rows=13 width=137) (actual time=
>> 120.83..10752.64 rows=539 loops=1)
>>    Index Cond: ((validtime >= 20070602000000::bigint) AND (validtime <=
>> 20070602235500::bigint) AND (latitude = 60.2744::double precision) AND
>> (longitude = 26.4417::double precision))
>>    Filter: (parname = 'temperature'::character varying)
> You do realize that's going to scan the entire index range from
> 20070602000000 to 20070602235500?
> If this is a typical query you'd be better off putting the lat/long
> columns first in the index.
> 			regards, tom lane
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?

Oleg Bartunov, Research Scientist, Head of AstroNet (,
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su,
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

pgsql-performance by date

Next:From: Karl WrightDate: 2007-06-20 17:55:20
Subject: Re: Performance query about large tables, lots of concurrent access
Previous:From: Francisco ReyesDate: 2007-06-20 17:53:07
Subject: Re: Performance query about large tables, lots of concurrent access

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group