What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

Wondering what the upper limits are. I'm guessing 32 bit signed integers for speed, but I suspect someone knows off the top of their head.

Without some testing, though, we wouldn't be able to determine if the code for the site handles overflows gracefully, which would turn a 2 billion rep (and change) into a negative 2 billion rep (again, assuming 32 bit signed integer). If this assumption is correct, then we only have another 22,000 years or so before Jon Skeet overflows, so a swift answer and action is important.

  • What is the storage format/space/type for rep and votes for a question/answer?
share|improve this question
3  
Rep would overflow at 2 billion, not to million. So we still have 22000 years ahead without having to worry about that... –  sth Nov 7 '09 at 4:54
    
Doh! Fixed. I suppose we have a little more time to work on this issue. –  Adam Davis Nov 9 '09 at 18:43
1  
@sth: I wouldn't be so sure about that. Jon Skeet's reputation have already overflowed. This is his second iteration. –  Second Rikudo Mar 19 '13 at 22:05
    
Most underrated question ever. Oh, and it's not CW. Take that 5 addition rep, Adam Davis! –  Adam Rackis Mar 19 '13 at 22:13
add comment

2 Answers

up vote 2 down vote accepted

If I understand correctly, votes for a given post aren't stored as a value that gets incremented/decremented in the same table as the post itself. Votes are stored in a separate table, and are associated with a post via a foreign key. So every vote you cast is actually a separate record in a table in the DB.

I'm basing all this on StackQL, which is based on the data dump, so it could easily be wrong given that the source is twice removed from the actual database that the site runs on.

share|improve this answer
    
This seems true, because the system tracks who voted on what. (This is why you can "undo" your votes.) –  jason Nov 7 '09 at 5:05
    
I think that votes on a post are denormalized –  perbert Nov 7 '09 at 21:40
    
    
Ah, so in that case it depends on the DB count type (I assume they have the DB do the work of adding) and the SW count type. –  Adam Davis Nov 9 '09 at 18:42
add comment

Why does this matter? If it becomes a problem I hear there is this ALTER COLUMN statement that fixes things.

share|improve this answer
add comment

You must log in to answer this question.

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