Re: Optimizer is not choosing index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom,

thanks for your suggestion:


> Markus Innerebner <markus.innerebner@xxxxxxxxxxxx> 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.

indeed: the id column in the node table had as type numeric, while in edges the target is integer.

After changing it, the index is used again.

many thanks


cheers Markus
-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux