At 01:35 AM 6/29/99 , Kevin Smith wrote:
>Hi Jon,
>
>Thanks for letting me know. :-)
>
>Just a thought, in your select query you use the like for the column
>url.url, which inevitably will slow it down a bit.
>
>Can you not produce stats in one whole query, export the results to a
>text file and then split the results later?
>
>For example...
>
>SELECT url.url AS URL, SUM(count) AS 'Total Views'
>FROM pageview, url
>WHERE (((url.id)=(pageview.id))
>AND ((pageview.date)=('1999-06-16')))
>GROUP BY url.url
>ORDER BY url.url;
>
>I'm not too sure if the GROUPING will have the same affect, but it should
>be quicker.
i get "ERROR 1114: The table 'SQL28_0' is full" when i do that.
the other problem is that the requirement is to have things reported on in
the aggregate, that is, they don't want to see a separate line for
everything in /action, they want it all in one row.
i could pre-aggregate the data before storing it in mysql, but having the
raw format around is much more useful, because there are inevitably one-off
requests. i might just write a perl script to read the entire joined table
into memory and do the grouping that way, instead of using SQL. kinda
sucks because i wanted to leverage mysql as much as possible.
Jon Drukman
Director Of Technology
GameSpot