Re: Problem with nested query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis Perchine <dyp(at)perchine(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with nested query
Date: 2000-10-03 04:56:56
Message-ID: 16810.970549016@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Denis Perchine <dyp(at)perchine(dot)com> writes:
> As far as you can see it uses sequence scan for inner select. This is quite
> strange as if I do this select with a constant it will use index scan:

Are the two tables' "email" fields declared as exactly the same
datatype?

IIRC, 7.0.* has a problem with recognizing that a type-coerced parameter
to an inner query is useful as an indexscan reference constant. This is
fixed in current sources, but in the meantime avoiding an implicit type
coercion is the easiest workaround.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-10-03 05:01:46 Re: Fake table name?
Previous Message Denis Perchine 2000-10-03 04:17:11 Problem with nested query