pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Stephen Frost <sfrost@snowman.net>
To: David Jarvis <thangalin@gmail.com>
Cc: Matthew Wakeling <mnw21@cam.ac.uk>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimize date query for large child tables: GiST or GIN?
Date: Thu, 20 May 2010 17:30:29 -0400
Message-ID: <20100520213029.GQ21875@tamriel.snowman.net> (raw )
In-Reply-To: <AANLkTik4bMwdV6C9Xyv1R1RfrV4OltRGwExGcdZZyEHI@mail.gmail.com >
References: <AANLkTimi_Jh4J6bLZ8lZ0cGQ0VVG7XPCKaFN9GRHd6mP@mail.gmail.com >
<alpine.DEB.2.00.1005201355020.23334@aragorn.flymine.org >
<AANLkTimaurzBzHWiir_Bd_GcljdE2IWOe1hF589sX49J@mail.gmail.com >
<alpine.DEB.2.00.1005201259240.10164@aragorn.flymine.org >
<AANLkTil9C0gclBGzm2XKPx74GwpZwffEHXoCxo63_7GY@mail.gmail.com >
<alpine.DEB.2.00.1005201605170.23865@aragorn.flymine.org >
<AANLkTik4bMwdV6C9Xyv1R1RfrV4OltRGwExGcdZZyEHI@mail.gmail.com >
* David Jarvis (thangalin@gmail.com) wrote:
> I was still referring to the measurement table. You have an index on
> > stationid, but still seem to be getting a sequential scan. Maybe the planner
> > does not realise that you are selecting a small number of stations. Posting
> > an EXPLAIN ANALYSE would really help here.
> >
>
> Here is the result from an *EXPLAIN ANALYZE*:
Yeah.. this is a horrible, horrible plan. It does look like you've got
some serious data tho, at least. Basically, PG is sequentially scanning
through all of the tables in your partitioning setup. What is
constraint_exclusion set to? What version of PG is this? Do the
results og this query look at all correct to you?
Have you considered an index on elevation, btw? How many records in
that city table are there and how many are actually in that range?
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 196B) download
view thread (44+ messages) latest in thread
Message-ID: <20100520213029.GQ21875@tamriel.snowman.net>
Permalink: ../20100520213029.GQ21875@tamriel.snowman.net/
Also on: postgresql.org/message-id/20100520213029.GQ21875@tamriel.snowman.net
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sfrost@snowman.net, thangalin@gmail.com, mnw21@cam.ac.uk
Subject: Re: Optimize date query for large child tables: GiST or GIN?
In-Reply-To: <20100520213029.GQ21875@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox