if not indicate id_master the query must scroll all id_master (then the entire archive) so you better define the index: CREATE UNIQUE INDEX ON UNQ_DETAILS_DATA DETAILS_DATA (ID_PARAM, ID_MASTER) to limit your search to only id_param = 60 with query where id_param = 60. greetings -------Messaggio originale------- Da: Virgo Pärna virgo.pa...@mail.ee [firebird-support] Data: 18/07/2015 8.02.41 A: firebird-support@yahoogroups.com Oggetto: [firebird-support] Re: Is it possible to use only "part" of the index? On 17 Jul 2015 07:14:02 -0700, brucedickin...@wp.pl [firebird-support] <firebird-support@yahoogroups.com> wrote: > CREATE UNIQUE INDEX UNQ_DETAILS_DATA ON DETAILS_DATA (ID_MASTER,ID_PARAM); > > when performing this query: > > WHERE > DD.ID_PARAM = 60 >
ID_PARAM is second field in the index. So the index cannot be used, because it would need to check all ID_MASTER values anyway. -- Virgo Pärna virgo.pa...@mail.ee [Non-text portions of this message have been removed]