Slide 1Query optimisation 1 Slide 2 2 Example - hospital database 100 tuples 2500 tuples Doctors Patients Slide 3 Query optimisation 3 Query Get the name of the doctors who…