Subject Firebird 1.5.2 and index using with subselect
Author ibrahim bulut
Hi,
i have a problem with firebird 1.5.2 about index using.
subqueries don't use the index with this sql code

SELECT ID, NAME FROM STOCK
WHERE TYPE_ID IN (SELECT ID FROM STOCKTYPES WHERE ACTIVE = 'Y')

why this problem occurs.

type_id fields in the stock table is indexed

if i user this sql code firebird is using index

SELECT ID, NAME FROM STOCK
WHERE TYPE_ID = 5

is there any suggestion about this subject