I'm wondering whether indexes should be added to various fields in a table, when it's known that those fields would be used in "SELECT...WHERE [field] = ..." queries.
For example, let's say i have a "user" table with the following fields:
id(primary), userName, firstName, lastName
Assuming i will have a query like "SELECT * FROM user WHERE userName = 'someUser123';", should an index be added to the userName column?
Will this query be faster if an index is present, in a scenario where i have thousands of records?