What is the primary purpose of indexing in a database management system?
a) To encrypt data for security
b) To optimize query performance by quickly locating and retrieving data
c) To create backups of the database
d) To manage user access and permissions