Subject Firebird Indexing problem
Author

Hi guys,

I have a problem with indexing in FB. Heres the query


select rep$log.pk, tablica_ime, client_number, time_stamp, sql_type, sql_query, usr

from rep$log

where usr <> 'REPL' and not exists

(select rep$trans.pk from rep$trans where rep$trans.replicated_pk = rep$log.pk)


Statistics show that rep$log has all non-indexed reads even though I've created an index for the usr field.


What's more interesting is that if I change this line

where usr <> 'REPL' and not exists

to

where usr = 'SYSDBA' and not exists


all tha reads are indexed. So the problem is in the <> operation. How can I have indexed reads and keep the <> operation?


Thank you in advance guys.