Re: Query optimization - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: Query optimization
Date
Msg-id 20051001152906.GY40138@pervasive.com
Whole thread Raw
In response to Query optimization  (Sean Davis <sdavis2@mail.nih.gov>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Exporting just schema/metadata (w/o data) in Postgres
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Exporting just schema/metadata (w/o data) in Postgres