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: Pine.LNX.4.64.0706202152250.1881@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mikko,

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 q3c.sf.net. See some details
http://www.sai.msu.su/~megera/wiki/SkyPixelization

Oleg

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?
>
> http://archives.postgresql.org
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Browse pgsql-performance by date

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