Re: Optimizer is not choosing index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Innerebner <markus(dot)innerebner(at)inf(dot)unibz(dot)it>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizer is not choosing index
Date: 2012-02-15 23:11:20
Message-ID: 24345.1329347480@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Markus Innerebner <markus(dot)innerebner(at)inf(dot)unibz(dot)it> writes:
> The query plan says, that a sequential scan is performed on the edge table. I consider it strange that he is not accessing on the (btree) index one the edge table.

This suggests that you have a datatype mismatch:

> " Hash Cond: ((e.target)::numeric = n.id)"

Your index is presumably on e.target, not e.target::numeric, so it's not
applicable. Try to make the join columns the same datatype.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Han Zhou 2012-02-16 01:44:53 Re: Fwd: [HACKERS] client performance v.s. server statistics
Previous Message Markus Innerebner 2012-02-15 22:40:13 Optimizer is not choosing index