Latency and optimizing SQL queries
Latency and optimizing SQL queries
Posted May 25, 2011 4:52 UTC (Wed) by swmike (guest, #57335)Parent article: Scale Fail (part 1)
People generally don't seem to grasp latency as a problem. Most applications are developed on a gig-connected server in the basement which has virtually no latency to the database server. When you create an application that queries and gets a list, and you then do one query per item in the list, this is not a problem in dev testing.
Now, have the database server further away from the client doing the queries, and you now have a huge problem. Spending a bit more time on the SQL query and do everything in a single query would solve this problem, but from looking at the network traffic in most client/server applications, this seems like a lost art.
In your dev testing, insert a box that induces 500ms latency between client and server and check that the application still runs fine. If it doesn't, redesign.
