Are you sure?It shoul use 2 as it i equal to(registro_pri_roest = 1 and 
registro_sec_roest = 1) or(registro_pri_roest = 1 and registro_sec_roest = 2) 
Regards,Karol Bieniaszewski
-------- Oryginalna wiadomość --------Od: Adriano dos Santos Fernandes 
<adrian...@gmail.com> Data: 17.06.2020  21:00  (GMT+01:00) Do: 
firebird-devel@lists.sourceforge.net Temat: Re: [Firebird-devel] Odd difference 
for IN (..) and = ANY (..) in
  SELECT vs WHERE On 17/06/2020 15:46, Leyne, Sean wrote:>>> So it's about 
this, correct?>>>> -- Uses two index segments>> select registro_sec_roest from 
dp_registro_oest where registro_pri_roest = 1>> and registro_sec_roest = 1;>>>> 
-- Uses one index segment - more generalization of IN problem select>> 
registro_sec_roest from dp_registro_oest where registro_pri_roest = 1 and>> 
registro_sec_roest in (1, 2);>>>> -- Uses one index segment - IN problem>> 
select registro_sec_roest from dp_registro_oest where registro_pri_roest = 1>> 
and (registro_sec_roest = 1 or registro_sec_roest is null);> What about:>> 
select registro_sec_roest from dp_registro_oest where >> How many segments 
would be used?  (IMO answer should be 2)>>x IN (constant_list) is the same as 
(x = n1 or x = n2 or ...) for theengine, so 1.AdrianoFirebird-Devel mailing 
list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to