I focused on the order of comments in SO, but I can't figure out a specific rule. If you look carefully, you see a interesting order for comments. The order depends on both comment's votes and comment's ids. Now I want to know, what is that combination? Does anybody know?

Maybe it is something like this:

ORDER BY (timestamp)+(total_vote*100)


  • timestamp : Stores the time which comment has been entered.

  • total_vote : Stores the number of total votes for each comment.

  • what do you mean order? The order they're displayed in under the post?
    – Shog9
    Commented Dec 17, 2015 at 18:55
  • @Shog9 Yes exactly.
    – Shafizadeh
    Commented Dec 17, 2015 at 18:58
  • 4
    It's always timestamp.
    – Shog9
    Commented Dec 17, 2015 at 18:59
  • @Shog9 I don't think so, because if sixth comment (which have to be hide in first) get a vote, then it will be show (I mean is behind "show more comment")
    – Shafizadeh
    Commented Dec 17, 2015 at 19:04
  • 3
    Yes, but the comments shown will still be in chronological order.
    – Shog9
    Commented Dec 17, 2015 at 19:05
  • 5
    When there are lots of comments, the system automatically hides comments with no or few upvotes. When you click "show more", it places all of the hidden comments back where they would have been chronologically.
    – Catija
    Commented Dec 17, 2015 at 19:06

1 Answer 1


It is the same for all sites. What varies is the definition of a lot of comments.

  • if there are not a lot of comments, they are in time order
  • if there are a lot of comments, those with no upvotes are hidden. The unhidden ones are still in time order

More details: Proposed tweak to comment UI for long threads

  • Ah, alright then ..! +1
    – Shafizadeh
    Commented Dec 17, 2015 at 19:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .