MKCL Interview Question

Write a code for some simple program on paper and explain the logic.How index work in sequel database. How to improve database performance.