Subject | Re: [firebird-support] Using Nested Selects |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2009-11-19T15:02:40Z |
> it would have used the TransactionNo index to rapidly locate the few TransactionItem records associated with each Transaction.Not quite. Better approach could be join+distinct or execute
>
> For example
>
> Select * from TransactionItems TI
> where TI.TransactionNo in (Select TransactionNo from Transactions
> where PersonNo = 200)
>
> TransactionNo is an indexed field of TransactionItems
>
> Is this the right way to approach this?
block+for select. But all depends on number of records in tables and
result sets of both queries.
SY, SD.