I have mysql tabel called 'users'. There are two obvious fields: 'user' and 'pass'.
My authentication query is like this:
"SELECT pass FROM users WHERE user = ? AND pass = ?"
I'd tought indexing could speed up the query. Should I index only 'user' field or also 'pass' field?
Also is comparing passwords with sql query faster than with PHP string compare.