Re: Inefficient query plan - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Inefficient query plan
Date
Msg-id 1282574235-sup-6539@alvh.no-ip.org
Whole thread Raw
In response to Inefficient query plan  (Jann Röder <roederja@ethz.ch>)
Responses Re: Inefficient query plan
List 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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Inefficient query plan
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Inefficient query plan