Re: IN subquery not using a hash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Tillotson <spam1011(at)adelphia(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: IN subquery not using a hash
Date: 2005-07-21 01:13:06
Message-ID: 27268.1121908386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paul Tillotson <spam1011(at)adelphia(dot)net> writes:
> Tom Lane wrote:
>> Hardly likely, considering it's estimating only 296 rows in the subquery
>> output. My bet is that you've chosen a datatype whose comparisons are
>> not hashable (like char(n)). What is the datatype of parentid in these
>> tables, anyway?
>>
> I don't have access to the machine now, but my memory is that
> parent.parentid is numeric(10,2) and child.parentid is int.

Offhand I don't believe there are any hashable crosstype comparisons.
In this case the int is probably getting promoted to numeric, but I
think numeric comparison isn't hashable either (because for example
'0.0' = '0.000' but the internal representations are different).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jamie Deppeler 2005-07-21 01:35:57 No user being created during initdb for OS X
Previous Message Michael Fuhr 2005-07-21 01:03:28 Re: IN subquery not using a hash