Normally id have the threads table have this
lastpostusername
lastposttime
lastpostuserid - The users identification
And they just get updated when someone posts a new reply. A lot easier than a second method.
Which would be to get all the posts from that thread, and find the last post by time. Itd take a long time to do.