Subject RE: [firebird-support] Question about using Indexes (long post)
Author Kevin Lingofelter

I think you are looking at the wrong "first" select. The 2 selects in
question are found after the line:

delete from TEMP$PARTS;

The first select statement is directly after that line. The second is
directly after:

if (DPI <> :D3) then begin

Sean, I will try removing the alias to see if it changes anything. Thanks, I
will keep you posted.

Kevin Lingofelter

Sean Replied:
>But let me point out, that you are using the same table aliases for the 2
statements -- I generally only use an alias once in an SP (just my own
little >'standard').

Helen Replied:
>They aren't identical. The first query has an inner join; whereas the
>second query has an outer join. The assessment of the relative costs of
>stream formation for inner and outer joins will have different
>outcomes. You also might like to investigate whether you actually need
>SELECT either or both queries.

Sean Replied: