<pedrocorreia.net ⁄>
 

<Cache Your SQL Queries to Save Resources ⁄ >




clicks: 3022 3022 2007-04-20 2007-04-20 goto tecnologia myNews tecnologia  Bookmark This Bookmark This


Large arcade sites that get massive traffic have to deal with a lot of issues regular arcades don't have to deal with. Issues like CPU and bandwidth usage can become so overwhelming that they can bring your entire site to a halt. When you are spending a few hundred dollars a day advertising your arcade, the last thing you want is for your site to go down. One of the ways to alleviate the strain on your server would be to cache your SQL queries.



Most arcade sites have lots of interesting stats that load on the index page of their sites like most popular game, newest games, top users, random games, etc... For example, my site's script, onArcade, has stats like this in the left column that is loaded not only on the index page but every page on the site. The way the arcade scripts are all written is that they perform an SQL query for each of those functions EVERY time someone loads the page. Most of that stuff isn't changing by the second so there really isn't a need to always grab the up-to-the-second copy of the data. So what can you do? The answer is to cache some of the functions that may not need to be that "fresh". Obviously, some things will not be able to be cached like logins, functions that add to game counts, how many users are online, or anything else that requires an instant connection to the database. Caching SQL queries can be extremely important for arcades that have their SQL on a separate server than the web server for obvious reasons. If you don't have to go to the remote server to download the data from the DB the page will load faster and fewer resources will be required. I will be covering how to separate your Web and SQL servers in a later tutorial.



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://www.arcadewebmasters.com/tips-and-tricks/cache-your-sql-queries...




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="tecnologia" ⁄>

MongoDb Architecture new ...

NOSQL has become a very heated topic for large web-scale deployment where scalability and semi-struc (...)

clicks: 18032 18032 2012-05-14 2012-05-14 goto url (new window) horicky.blogspo... goto myNews tecnologia


A Hopefully Fair and Useful Comparison of Haskell Web Frameworks new ...

Recently there has been a lot of discussion and questions about the differences between the big thre (...)

clicks: 14579 14579 2012-05-13 2012-05-13 goto url (new window) softwaresimply.... goto myNews tecnologia


Retina graphics for your website new ...

retina.js is an open source script that makes it easy to serve high-resolution images to devices wit (...)

clicks: 14417 14417 2012-05-11 2012-05-11 goto url (new window) retinajs.com/ goto myNews tecnologia


What every programmer should know about memory, Part 1 new ...

In the early days computers were much simpler. The various components of a system, such as the CPU, (...)

clicks: 15768 15768 2012-05-10 2012-05-10 goto url (new window) lwn.net/Article... goto myNews tecnologia


The State Of HTML5 Video

HTML5 has entered the online video market, which is both exciting and challenging for developers in (...)

clicks: 6322 6322 2012-02-14 2012-02-14 goto url (new window) longtailvideo.c... goto myNews tecnologia


A Tour of Amazon's DynamoDB

Amazon's recent release of DynamoDB, a database whose name is inspired by Dynamo, the key-value data (...)

clicks: 5987 5987 2012-02-13 2012-02-13 goto url (new window) paperplanes.de/... goto myNews tecnologia


Video: CSS3 Secrets: 10 things you might not know about CSS3

A number of prominent front-end developers delivered helpful talks at this year's Fronteers 2011 con (...)

clicks: 6521 6521 2011-11-30 2011-11-30 goto url (new window) css.dzone.com/a... goto myNews tecnologia


Google BigQuery Service: Big data analytics at Google speed

Rapidly crunching terabytes of big data can lead to better business decisions, but this has traditio (...)

clicks: 5661 5661 2011-11-30 2011-11-30 goto url (new window) googlecode.blog... goto myNews tecnologia