pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: AJ Weber <aweber@comcast.net>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: Shaun Thomas <sthomas@optionshouse.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: how to improve perf of 131MM row table?
Date: Thu, 26 Jun 2014 11:38:53 -0400
Message-ID: <53AC3E8D.8040106@comcast.net> (raw)
In-Reply-To: <CAGTBQpZNueaUF8=ZZRZW+v4o5Vfdg0ssJdqgT_sMnH7R0JfqZg@mail.gmail.com>
References: <53AB2CB1.8080201@comcast.net>
	<53AB35CC.10202@optionshouse.com>
	<1801a5d4-c3f1-4c0c-9c2c-ffb9d7f723a3@email.android.com>
	<53AB4551.4070207@optionshouse.com>
	<53AC1F6E.4000700@comcast.net>
	<CAGTBQpZNueaUF8=ZZRZW+v4o5Vfdg0ssJdqgT_sMnH7R0JfqZg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

I noticed this too.  I am trying to find where the actual SQL is 
generated, and I am seeing if this is an artifact of Hibernate.

Will test the same query without the quotes as you recommend.  (But I 
don't know where to fix that, if it is the actual issue, unfortunately.)

On 6/26/2014 11:35 AM, Claudio Freire wrote:
> On Thu, Jun 26, 2014 at 10:26 AM, AJ Weber <aweber@comcast.net> wrote:
>> OK, the sample query is attached (hopefully attachments are allowed) as
>> "query.sql".
>> The "master table" definition is attached as "table1.sql".
>> The "detail table" definition is attached as "table2.sql".
>> The EXPLAIN (ANALYZE, BUFFERS) output is here:
>> http://explain.depesz.com/s/vd5
>
> I think the problem is that you're sending strings in the ids, instead
> of integers.
>
> Remove the quotes, leave only the numbers. That will make pg able to
> infer that node.id = prop.node_id means it can also use an index on
> alf_node_properties.
>
> I think.
>
> Try.



-- 
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 (25+ messages)  latest in thread

Message-ID: <53AC3E8D.8040106@comcast.net>
Permalink:  ../53AC3E8D.8040106@comcast.net/
Also on:    postgresql.org/message-id/53AC3E8D.8040106@comcast.net

 · 

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: aweber@comcast.net, klaussfreire@gmail.com, sthomas@optionshouse.com
  Subject: Re: how to improve perf of 131MM row table?
  In-Reply-To: <53AC3E8D.8040106@comcast.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