Re: Very slow inner join query unacceptable latency

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Freddie Burgess <fburgess(at)radiantblue(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Very slow inner join query unacceptable latency
Date: 2013-05-21 21:34:20
Message-ID: CAJKUy5g-QAcgnhpfZKAzU88-G=aQX-iXh+VgL2U=mxywJ94PCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, May 21, 2013 at 3:54 PM, <fburgess(at)radiantblue(dot)com> wrote:
> The SARS_ACTS table currently has 37,115,515 rows
>
> we have indexed: idx_sars_acts_acts_run_id ON SARS_ACTS USING btree
> (sars_run_id)
> we have pk constraint on the SARS_ACTS_RUN table; sars_acts_run_pkey PRIMARY
> KEY (id )
>
> serverdb=# explain select count(*) as y0_ from SARS_ACTS this_ inner join
> SARS_ACTS_RUN tr1_ on this_.SARS_RUN_ID=tr1_.ID where tr1_.ALGORITHM='SMAT';

This is not a bug, you should write to the
pgsql-general(at)postgresql(dot)org or pgsql-performance(at)postgresql(dot)org
mailing lists.

anyway, seems that you need an additional index on SARS_ACTS_RUN.ALGORITHM

--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message fburgess 2013-05-21 21:49:58 Re: Very slow inner join query unacceptable latency
Previous Message fburgess 2013-05-21 20:54:08 Very slow inner join query unacceptable latency