choose the best structure

Hi, I've this situation:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

/*
// type of structure


n.b. all proprietes are fixed lenght or max fixed lenght, except for number of match, they increase day by day

        match 			(int or string)
	date			(datetime) fixed
	hostcity 		(string) fixed

	home_team		(string) fixed
		points		(int) fixed

		player1		(int) fixed
			points	(int)fixed
		player2
			points
		player3
			points
		player4
			points
		player5
			points
		
	guest_team
		points

		player1
			points
		player2
			points
		player3
			points
		player4
			points
		player5
			points


// information to compute

create new objects/structure match for every match in sql table

count all points of a team in all match

count all points of a team when it's home_team
count all points of a team when it's host_team

count how many times playerX is in the match

count how many times playerX is in the match as home_team player
count how many times playerX is in the match as host_team player

count the max series of match where playerX is in the home_team or guest_team
count the max series of match where playerX is not in the home_team or guest_team

count the winned match where playerX1, playerX2 and playerX3 are in home_team or guest_team
compute total sum of points of playerX1, playerX2, playerX3 when they are in the match together

print sort lists of various count/compute

and more...
*/

I'll load all sql datas as structures or in array, and then compute them, sql is so slow for this kind of compute.
I sought for various methods, functions, type-tructure to make this possible but I'm luck of experience to judge what are the best choice for realize it;
please suggest me the right way with example if possible.

if there is something to be explained, I'am here.

Thanks

Nice site and people
Topic archived. No new replies allowed.