At the main page, the number of unique users,hosts and
sites are calculated wrong, since the trafficSummaries
table contains an entry for each one per day.
A tripple JOIN on that SQL statement can't be used, as
it returns data only after too much time (>5 mins/query!).
What probably needs to be done is to break the SQL
statement to smaller and simpler queries and unify the
data through PHP.