"Deletion" in terms of using the Moodle administrative interface is exactly that, it doesnt completely remove users, so you are right, ideally you'd just want to use a query to update the deleted field.
I've added a reply to the other forum thread you referenced with an updated query for selecting the users who have never logged in and also a query to set these as being "deleted".
You can see that here...
http://moodle.org/mod/forum/discuss.php?d=75487#p630496
Hardware and performance
Automatically delete users who never login
This discussion has been locked so you can no longer reply to it.