From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Innerebner <markus.innerebner@inf.unibz.it>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizer is not choosing index
Date: Wed, 15 Feb 2012 18:11:20 -0500
Message-ID: <24345.1329347480@sss.pgh.pa.us> (raw)
In-Reply-To: <DF644560-967D-4B1B-BEE0-49020DC1359F@inf.unibz.it>
References: <DF644560-967D-4B1B-BEE0-49020DC1359F@inf.unibz.it>
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 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
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: tgl@sss.pgh.pa.us, markus.innerebner@inf.unibz.it
Subject: Re: Optimizer is not choosing index
In-Reply-To: <24345.1329347480@sss.pgh.pa.us>
* 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