Page 1 of 1

League Site's 'Team' Page

Posted: Fri Jan 30, 2009 5:52 am
by slime
I have a small question here..how come on the league site's 'team' page, the total number of matches a team has played and the number of members a team has does not show up? I'm pretty sure I remember them being there way back when..there's even still ()'s where the total number of matches should be. I sort of remember too a message saying that they were taken off, but would be replaced shortly. This was all long ago, and I am just wondering why they were taken off, and whether or not those two categories will be added again.

Re: League Site's 'Team' Page

Posted: Fri Jan 30, 2009 10:23 am
by dexter
Was wondering the same thing, since all of that info appears on the ducati league team page.

Re: League Site's 'Team' Page

Posted: Fri Jan 30, 2009 11:38 am
by Mucho Maas
This is due the involved SQL query. With the increasing amount of matches in the database, that query takes a considerable amount of time to retrieve those values. For a single team to calculate this value as is done on the team page is trivial. Calculating them in a single query for listing the teams is another matter. That is why it was removed, and will stay removed until someone implements a solution for this.

Re: League Site's 'Team' Page

Posted: Fri Jan 30, 2009 3:12 pm
by Saturos
The ducati-guys found an solution, I believe. I remember that they disabled those numbers, too long time ago, but are able to display them now. Are we using an older webleague?

Re: League Site's 'Team' Page

Posted: Fri Jan 30, 2009 7:25 pm
by blast
Foo wrote:This is due the involved SQL query. With the increasing amount of matches in the database, that query takes a considerable amount of time to retrieve those values. For a single team to calculate this value as is done on the team page is trivial. Calculating them in a single query for listing the teams is another matter. That is why it was removed, and will stay removed until someone implements a solution for this.
Sounds like it's being done wrong then. Don't run a query that counts how many matches each team had. Store how many matches they had right in the team table, and then increment that when a new match is added.

Re: League Site's 'Team' Page

Posted: Fri Jan 30, 2009 7:43 pm
by Mucho Maas
blast wrote:Sounds like it's being done wrong then. Don't run a query that counts how many matches each team had. Store how many matches they had right in the team table, and then increment that when a new match is added.
Yeah, but [dmp] aint here and menotume is to busy tking :)
Saturos wrote:Are we using an older webleague?
Yes, that's true. The problem is not so much in updating the web code for it, but to update the table schema to reflect changes in the php code. It's not rocket science, but will require backing up of the database, testing, etc etc.