Design Simply

Simplicity in design, photography & code.


Archive for the 'MySQL' Category

9 Effective Ways to Tune Your MySQL Performance

Friday, November 17th, 2006

Often, web developers turned database designers begin their coding endeavors by picking up whatever snippets are printed in the O’reilly title at hand or whatever Google throws their way. Building a database-driven website is easy. Making it fast is not. A little attention to schema, indexes, query optimization, and benchmarking could give your app the performance boost it needs to reach greatness.

  1. Benchmark to measure success
  2. Get familiar with the EXPLAIN command
  3. Know how the storage engines differ
  4. Narrow, non-redundant indexes are better
  5. Smaller data types are better
  6. Fewer reads = faster results: Use the query cache for read intensive apps
  7. Learn to use joins properly
  8. Use calculated fields only when necessary
  9. Increase memory

(more…)

MySQL Connection Class

Sunday, September 17th, 2006

This is a simple mysql connection class that I’ve been using. I follow Jay Pipes advice about lazy loading from this post.

Here are the files in text.

  • includes/database.inc.php (txt)
  • includes/db.php (txt)
  • dbtest.php (txt)


Copyright © 2000-2010 Sheri Bigelow. Proudly powered by WordPress and hosted by bluehost.
Log in. Valid XHTML 1, CSS 2. Entries (RSS) and Comments (RSS).