Re: Inefficient query plan

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jann Röder <roederja(at)ethz(dot)ch>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Inefficient query plan
Date: 2010-08-23 14:38:35
Message-ID: 1282574235-sup-6539@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-08-23 14:40:25 Re: Inefficient query plan
Previous Message Kevin Grittner 2010-08-23 14:21:09 Re: Inefficient query plan