title: Best way to find out if user is already registered
body: <p>How to find out, that a user is already registered, for e.g. in a web application? Like I have a database of 1 million users. Every time comparing every single row in database is inefficient. Is there any other optimal approach?</p>