The below was the Database(SQL Server/Oracle) question asked by Interviewer to me.
How do i call a specific index In case if i have multiple indexes?
I have no idea on it. I searched in google but failed.
The below was the Database(SQL Server/Oracle) question asked by Interviewer to me.
How do i call a specific index In case if i have multiple indexes?
I have no idea on it. I searched in google but failed.
You can provide hints to the optimiser.
Index hints look like this:
SELECT /*+ INDEX(<table name> <index name> <optional free text comment> */ field1, field2...
Example:
SELECT /*+ INDEX(patients sex_index) use sex_index because there are few
male patients */ name, height, weight
FROM patients
WHERE sex = 'm';