Subject Re: [firebird-support] Detail performance
Author Dimitry Sibiryakov
On 26 May 2006 at 7:12, Lester Caine wrote:

>TICKET - primary key INTEGER from GENERATOR
>TRANSACTIONS ( detail for TICKET ) - primary key INTEGER, TIMESTAMP
>
>I need the first and second TRANSACTIONS entry for each ticket, so I
>was using SELECT FIRST 1 (SKIP 1) PREVIOUS FROM TRANSACTIONS WHERE
>TICKET_ID = TICKET_ID ORDER BY TRANSACT. Which was showing that the
>plan used the primary key index.

I'd suggest to try ORDER BY TICKET_ID, TRANSACT...

--
SY, Dimitry Sibiryakov.