pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Jann Röder <roederja@ethz.ch>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Inefficient query plan
Date: Mon, 23 Aug 2010 10:38:35 -0400
Message-ID: <1282574235-sup-6539@alvh.no-ip.org> (raw)
In-Reply-To: <i4st4a$e8v$1@dough.gmane.org>
References: <i4st4a$e8v$1@dough.gmane.org>

Excerpts from Jann Röder's message of lun ago 23 00:23:38 -0400 2010:

> "Hash Join  (cost=516.66..17710110.47 rows=8358225 width=16)"
> "  Hash Cond: ((b.itemid)::bpchar = a.itemid)"
> "  ->  Seq Scan on b  (cost=0.00..15110856.68 rows=670707968 width=16)"
> "  ->  Hash  (cost=504.12..504.12 rows=1003 width=16)"
> "        ->  Index Scan using idx_issueid on a  (cost=0.00..504.12
> rows=1003 width=16)"
> "              Index Cond: (issueid = 'A1983PW823'::bpchar)"

Hmm, I'm placing bets on the bpchar weirdness.  I'd try getting rid of
that and using plain varchar for all the columns.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (23+ messages)  latest in thread

Message-ID: <1282574235-sup-6539@alvh.no-ip.org>
Permalink:  ../1282574235-sup-6539@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1282574235-sup-6539@alvh.no-ip.org

 · 

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: alvherre@commandprompt.com, roederja@ethz.ch
  Subject: Re: Inefficient query plan
  In-Reply-To: <1282574235-sup-6539@alvh.no-ip.org>

* 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