I'm looking for the approach in testing performance of SQL queries in different conditions. For example I have 2 tables with identical structure and data, but one was partitioned, and another one wasn't. And I need to figure out time for select (with different conditions) and update.
Is there a standard way or approach for this purpose?
I have MySQL 5.1 running.
开发者_JAVA技巧Thanks.
The times will change as the data in the tables changes.
A better alternative would be to use EXPLAIN PLAN on both schemas and see if one query has a higher cost than the other. That will remain true regardless of how the data changes. I'd choose on that basis rather than arbitrary timings from benchmarks.
It'll also tell you the benefit of adding indexes as your queries change.
Go with EXPLAIN PLAN.
精彩评论