SELECT HistContact.PK_HistContact, HistContact.FK_HistRec; FROM HistContact; INNER JOIN HistRec ON HistRec.PK_HistRec == HistContact.FK_HistRec; INNER JOIN HistFile ON HistFile.PK_HistFile == HistRec.FK_HistFile; INNER JOIN HistDocket ON HistDocket.PK_HistDocket == HistFile.FK_HistDocket; WHERE (HistContact.FCC == "ABARJ329395001") AND (HistDocket.Docket == "9999") AND (HistFile.OutputType == "M")Table HistContact have indexes on those fields:
Using index tag Fcc to rushmore optimize table histcontact Rushmore optimization level for table histcontact: partial Rushmore optimization level for table histrec: none Using index tag Outputtype to rushmore optimize table histfile Rushmore optimization level for table histfile: partial Using index tag Docket to rushmore optimize table histdocket Rushmore optimization level for table histdocket: partial Joining table histdocket and table histfile using index tag Fk_histdoc Joining table histcontact and table histrec using index tag Pk_histrec Joining intermediate result and intermediate result using temp indexI guess the partial optimisation from tables HistContact, HistFile and HistContact is because I have no DELETED () index on these tables and it's OK.
Joining intermediate result and intermediate result using temp index
Why it's not using the indexes PK_HistFile and FK_HistFile to join the tables HistFile and HistRec?