900000 rows definitely needs indexing, although why would you want a 5000 record result? surely you would be looking at this for one or two employees or a particular group - a department for example?