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
|
From: Thomas Goirand <thomas@goirand.fr>
Subject: Documents the score_board table format
--- mod_log_sql-1.100/contrib/create_tables.sql 2005-01-11 22:00:11.000000000 +0000
+++ ../libapache-mod-log-sql-1.100/contrib/create_tables.sql 2008-09-24 08:21:59.000000000 +0000
@@ -49,3 +49,24 @@
item varchar(80),
val varchar(80)
);
+
+# Added by Thomas Goirand (Debian maintainer and score_board patch upstream)
+# take care that the UNIQUE KEY is really VITAL of you don't want your server
+# to die with a huge MySQL load...
+create table scoreboard (
+ id int(14) NOT NULL auto_increment,
+ vhost varchar(50) NOT NULL default '',
+ bytes_sent bigint(14) unsigned NOT NULL default '0',
+ bytes_receive bigint(14) unsigned NOT NULL default '0',
+ count_hosts int(12) NOT NULL default '0',
+ count_visits int(12) NOT NULL default '0',
+ count_status_200 int(12) NOT NULL default '0',
+ count_status_404 int(12) NOT NULL default '0',
+ count_impressions int(18) NOT NULL default '0',
+ last_run int(14) NOT NULL default '0',
+ month int(4) NOT NULL default '0',
+ year int(4) NOT NULL default '0',
+ domain varchar(50) NOT NULL default '',
+ PRIMARY KEY (id),
+ UNIQUE KEY `vhost` (`vhost`,`month`,`year`,`domain`)
+) TYPE=MyISAM;
|