Re: Optimizer is not choosing index - Mailing list pgsql-performance

From Tom Lane
Subject Re: Optimizer is not choosing index
Date
Msg-id 24345.1329347480@sss.pgh.pa.us
Whole thread Raw
In response to Optimizer is not choosing index  (Markus Innerebner <markus.innerebner@inf.unibz.it>)
Responses Re: Optimizer is not choosing index
List pgsql-performance
Markus Innerebner <markus.innerebner@inf.unibz.it> writes:
> The query plan says, that a sequential scan is performed on the edge table. I consider it strange that he is not
accessingon 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

pgsql-performance by date:

Previous
From: Markus Innerebner
Date:
Subject: Optimizer is not choosing index
Next
From: Han Zhou
Date:
Subject: Re: Fwd: [HACKERS] client performance v.s. server statistics