by Tim Hunt.
If you only use mdl_log for running reports, you will find that over time it gets very slow, because mdl_log gets very big. That is why the user_last_access table was added in the first place.
The other thing to note is that the lastaccess table is not updated every single time the user requests a page. There is a constant LASTACCESS_UPDATE_SECS (equal to 60 seconds) and to improve performance, the last access information is only updated that frequently.