> 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 registro_pri_roest = 1 
and (registro_sec_roest = 1 or registro_sec_roest = 2);

How many segments would be used?  (IMO answer should be 2)


Sean



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to