This is quite a basic script, but it can cause huge bandwidth spikes. Let's talk about optimization and assume that there's 10000 views per hour. That means that you resend that query 10000 times an hour. That makes it 240000 requests per day. But would you believe that you can do the same thing only with 96 query requests per day? That would take a huge load off the server and might increase the performance. Here's how I would do it:
I'd use the same script, but set it up for a cron job to execute it automatically every 15 minutes but instead of outputting the data (and destroying it afterward), I'd save it to a simple text file and on each page request acces it with fopen() function, loop through the file and parse strings with $array_name = explode(" ",$string); function. Data output would be the same. I'd do the same with TOP 200 script, account creation and anything that would create a huge load on the server.
Cheers.