Re: Join on incompatible types - Mailing list pgsql-performance

From Shridhar Daithankar
Subject Re: Join on incompatible types
Date
Msg-id 3FB9F855.7010905@myrealbox.com
Whole thread Raw
In response to Join on incompatible types  (Laurent Martelli <laurent@bearteam.org>)
Responses Re: Join on incompatible types  (Laurent Martelli <laurent@aopsys.com>)
List pgsql-performance
Laurent Martelli wrote:

>>>>>>"scott" == scott marlowe <scott.marlowe@ihs.com> writes:
>
>
> [...]
>
>   scott> Note here:
>
>   scott> Merge Join (cost=1788.68..4735.71 rows=1 width=85) (actual
>   scott> time=597.540..1340.526 rows=20153 loops=1) Merge Cond:
>   scott> ("outer".id = "inner".id)
>
>   scott> This estimate is WAY off.  Are both of those fields indexed
>   scott> and analyzed?  Have you tried upping the statistics target on
>   scott> those two fields?  I assume they are compatible types.
>
> Should I understand that a join on incompatible types (such as integer
> and varchar) may lead to bad performances ?

Conversely, you should enforce strict type compatibility in comparisons for
getting any good plans..:-)

  Shridhar


pgsql-performance by date:

Previous
From: Laurent Martelli
Date:
Subject: Join on incompatible types
Next
From: Bruce Momjian
Date:
Subject: Re: duration logging setting in 7.4