pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Pushee <ian@intuvisiontech.com>
To: pgsql-performance@postgresql.org
Subject: Re: Slow query (planner insisting on using 'external merge' sort type)
Date: Fri, 19 Jun 2015 10:53:43 -0400
Message-ID: <55842CF7.6080007@intuvisiontech.com> (raw)
In-Reply-To: <A76B25F2823E954C9E45E32FA49D70ECCD489D78@mail.corp.perceptron.com>
References: <55842859.4060102@intuvisiontech.com>
	<A76B25F2823E954C9E45E32FA49D70ECCD489D78@mail.corp.perceptron.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>



On 6/19/2015 10:46 AM, Igor Neyman wrote:
>
> Probably events_confidnce index is not very selective, that's why optimizer prefers seq scan.
> I'd try to create an index on (name, eventspy_id, camera_id, type, status).
>
> Also, the recent 9.2 is 9.2.13, you should upgrade.
>
> Regards,
> Igor Neyman

Hi Igor,

I already have an index for (name, eventspy_id, camera_id, type, 
status)... that is the index being used (apparently silently) when I set 
random_page_cost=1.0.

Thanks,
-Ian


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (9+ messages)  latest in thread

Message-ID: <55842CF7.6080007@intuvisiontech.com>
Permalink:  ../55842CF7.6080007@intuvisiontech.com/
Also on:    postgresql.org/message-id/55842CF7.6080007@intuvisiontech.com

 · 

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: ian@intuvisiontech.com
  Subject: Re: Slow query (planner insisting on using 'external merge' sort type)
  In-Reply-To: <55842CF7.6080007@intuvisiontech.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