I think the "improvement" is about putting less strain on the RHP servers. Every user request in the past would require a full database query. This way you are accessing a static table that is created only once a day. That is a big saving in processing time.
No reason why one should not be able to sort by won-drawn-lost, though.
Originally posted by GatecrasherHm, but since you still get the most recent player data, just not in the right order, doesn't it still require a full database query? Or is it the sorting which takes so much processing time? I don't really know how these things work.
I think the "improvement" is about putting less strain on the RHP servers. Every user request in the past would require a full database query. This way you are accessing a static table that is created only once a day. That is a big saving in processing time.
No reason why one should not be able to sort by won-drawn-lost, though.
Originally posted by RavelloCrazy title. Why not something like: "New player tables are bad" or "I don't like the new player tables" or something?
Why did you deleted the opportunity to sort players ,in the rating tables,by Won,Lost,Drawn games?
I hate this. It's like when some members don't even type a name for the thread and it says: "New thread". Extremely annoying, to the point where you just have to step in there to see what's...
Oh, of course, that's why you did it. To get attention. 😉
Originally posted by NordlysSurely that's a bug? It should be sorted by rating first and ranking second. So if several players has the same rating they should be sorted by ranking.
And when sorting by rating, it doesn't really sort by rating, but by rank, which is only updated once a day.
I can understand if he doesn't want the application to recalculate ranking everytime user data changes, though. The ratings are stored and updated within each players own account (I would think), irrespective of other players, whereas calculating ranks is a much more involved task where he has to take into account every player. That's a lot of processing power down the drain.
So, by doing this calculation every 24hrs he's saving a lot of processing powers on the servers. Thus, increasing responsiveness of the entire site.
Originally posted by GatecrasherWell, that all depends on how the tables are stored. To sort by a field in a somewhat effective manner you'd need to index the field to sort by. Indexes take space. The bigger the table, the bigger the space.
No reason why one should not be able to sort by won-drawn-lost, though.
If Russ has information logged on how many users are using a certain feature and he sees that relatively few users are sorting according to won-drawn-lost, then he may want to save diskspace by removing indexes for those fields. Also, that would decrease the load on the servers since, obviously, no users will request those pages.
Originally posted by stockenWell, the rating determines the ranking (or if you sort by move number, for example, the move number determines the ranking), so you can't really "sort by ranking". If several people have the same rating, I think they are ranked alphabetically. What's confusing in the new tables is that the ranking is determined by the rating, move number etc. at a specific time of the day, while the tables show the newest rating, move number etc.
Surely that's a bug? It should be sorted by rating first and ranking second. So if several players has the same rating they should be sorted by ranking.
Originally posted by NordlysI see. So, ranking is more like your position in the table and nothing else. Well, then it makes no sense at all. That's not very hard to calculate. Hell, it doesn't even require calculating.
Well, the rating determines the ranking (or if you sort by move number, for example, the move number determines the ranking), so you can't really "sort by ranking". If several people have the same rating, I think they are ranked alphabetically. What's confusing in the new tables is that the ranking is determined by the rating, move number etc. at a specific time of the day, while the tables show the newest rating, move number etc.
But I understand now. (Sometimes - well, most of the time, actually - I'm a bit on the slow side.)
So, to avoid having to sort the tables on each request, Russ decided to create 3 static tables. One for each type of sorting we can do. He has the application update those tables every 24hrs, presorted according to the "real" player table as they were created. But instead of storing all the information in the static tables, he's just storing the player id's. Then, when you fetch the playertable he does a join on the "real" player table, and that's why we get current rating instead of the rating as it were when the table was sorted, but the sorting as it were when the table was created.
That's amusing. 😀
Whereas he saves a lot of server processing time not actually sorting the table on each request, he loses the consistency in the presented table. He should use the ratings, number of moves and whatever as it were defined when the table were created. Thus, nothing updates more often than 24hrs. That would at least be consistent. (It would take a lot more diskpace, but I think the consistency and the timesavings are worth it. Don't you?)
---
I just thought of something. Russ could setup a separate server wich would be a maintenance server, of sort. Now, once every hour or so, it would use the information from the "real" player table, and create the new static (sorted) player tables (with all fields static). Thus, no load on the servers that we all contact to fetch the pages, but hourly updates to the player tables.
Yup. I'm a genius. 😏
Originally posted by stockenI do, and I had the same idea, I just didn't mention it for fear of stating the obvious. 🙂
So, to avoid having to sort the tables on each request, Russ decided to create 3 static tables. One for each type of sorting we can do. He has the application update those tables every 24hrs, presorted according to the "real" player table as they were created. But instead of storing all the information in the static tables, he's just storing the player id's. re diskpace, but I think the consistency and the timesavings are worth it. Don't you?)
Yup. I'm a genius. 😏
Yes, for a baby you are doing quite well. 😉
Edit: Hey, your rank is 1000! 😀
Originally posted by NordlysAnd your ranking is 472! 😀 Whoooo...
Hey, your rank is 1000! 😀
What does that mean? My figure is better looking. That's what it means. Now, if only figure were important to a man like me... 🙂
Oh, you mean the number is better looking? No wait, I was the one who claimed it in the first place. 🙄
[3 edits and nothing actually added. Pittiful. Well, this edit is added, of course.]