Explain how indexing works in relational databases and the potential performance trade-offs of over-indexing.