Subject Re: [firebird-support] union performance
Author Ann W. Harrison
Milan Babuskov wrote:
> Sergio H. Gonzalez wrote:
>> select ID,descripcion from STOCK
>> union ALL
>> select id,razon_social from proveedores
>> order by 1
>>
>> PLAN (STOCK NATURAL)
>> PLAN (PROVEEDORES NATURAL)
>
> NATURAL means that no index is used. Do you have index on stock.ID or
> preoveedores.ID ?
>

How could firebird use an index with no WHERE clause and a UNION
that keeps it from walking an index?

Best,

Ann