From: Jim C. Nasby <jnasby@pervasive.com>
To: Sean Davis <sdavis2@mail.nih.gov>
Cc: pgsql-general@postgresql.org
Subject: Re: Query optimization
Date: Sat, 1 Oct 2005 10:29:07 -0500
Message-ID: <20051001152906.GY40138@pervasive.com> (raw)
In-Reply-To: <BF633374.F846%sdavis2@mail.nih.gov>
References: <BF633374.F846%sdavis2@mail.nih.gov>
On Fri, Sep 30, 2005 at 06:24:52PM -0400, Sean Davis wrote:
> -> Seq Scan on u_all_est_mrna c (cost=0.00..932582.74 rows=24225174
> width=179) (actual time=17.384..302484.904 rows=24225174 loops=1)
That step is where most of your time is being spent, which isn't
surprising given that it's scanning 24M rows. An index on
abs(tend-tstart) might help eliminate that. It will also probably help
if you increase the statistics_target for u_all_est_mrna, since it might
be best to join before filtering on abs(tend-tstart), which is the
opposite of what it's doing now.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
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-general@postgresql.org
Cc: jnasby@pervasive.com, sdavis2@mail.nih.gov
Subject: Re: Query optimization
In-Reply-To: <20051001152906.GY40138@pervasive.com>
* 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