EmergencyEMERGENCY? Get 24/7 Help Now!

MySQL: Followup on UNION for query optimization, Query profiling

 | August 14, 2006 |  Posted In: Insight for Developers

Few days ago I wrote an article about using UNION to implement loose index scan. First I should mention double IN also works same way so you do not have to use the union. So changing query to:

So as you see there are really different types of ranges in MySQL. IN range allows […]

Read More

Database problems in MySQL/PHP Applications

 | August 11, 2006 |  Posted In: Insight for Developers

Article about database design problems is being discussed by Kristian. Both article itself and responce cause mixed feellings so I decided it is worth commenting: 1. Using mysql_* functions directly This is probably bad but I do not like solutions proposed by original article ether. PEAR is slow as well as other complex conectors. I […]

Read More

Cache Performance Comparison

 | August 9, 2006 |  Posted In: Insight for Developers

Jay Pipes continues cache experiements and has compared performance of MySQL Query Cache and File Cache. Jay uses Apache Benchmark to compare full full stack, cached or not which is realistic but could draw missleading picture as contribution of different components may be different depending on your unique applications. For example for application containing a […]

Read More

Caching techinques

 | August 8, 2006 |  Posted In: Insight for Developers

Recently Jay Pipes published great article about lazy connecting and caching which reminded me my post on this matter is well overdue. Let me start with couple of comments about Jays article. First – caching in files should be used with caution. It may be very efficient especially if number of cached objects is small […]

Read More

MySQL Prepared Statements

 | August 2, 2006 |  Posted In: Benchmarks, Insight for Developers

If you care about archiving best performance in your application using MySQL you should learn about prepared statements. These do not neccesary provide performance beneft but they may, they also have other benefits. As a quick introduction – before MySQL 4.1 there were only textual statements and textual protocol for data transfer – query was […]

Read More

Extended EXPLAIN

 | July 24, 2006 |  Posted In: Insight for Developers

One nice feature added for EXPLAIN statement in MySQL 4.1 is EXTENDED keyword which provides you with some helpful additional information on query optimization. It should be used together with SHOW WARNINGS to get information about how query looks after transformation as well as what other notes optimizer may wish to tell us. It is […]

Read More

MySQL EXPLAIN limits and errors.

 | July 24, 2006 |  Posted In: Insight for Developers

Running EXPLAIN for problematic queries is very powerful tool for MySQL Performance optimization. If you’ve been using this tool a lot you probably noticed it is not always provide adequate information. Here is list of things you may wish to watch out. EXPLAIN can be wrong – this does not happen very often but it […]

Read More