Contributed by Calpont, InfiniDB Community Edition is an open source, scale-up analytics database engine for your data warehousing, business intelligence and read-intensive application needs. Enabled via MySQLTM and purpose-built for an analytical workload with column-oriented technology at its core, the multi-threaded capabilities of InfiniDB Community Edition fully encompass query, transactional support and bulk load operations.  So come on in, grab a download and get started.

             | 

How Can I Troubleshoot Slow SQL Queries?

E-mail Print PDF

From a general MySQL support standpoint, a user can see brief information regarding who is logged on and their currently running SQL using the show processlist command:


For troubleshooting individual SQL statement performance, there are two utilities that may be used.  First is the standard MySQL EXPLAIN utility, which is somewhat less than helpful for InfiniDB as InfiniDB does not use indexes or make use of MySQL I/O functionality.  Some information can be had in an EXPLAIN, however, as the following example shows:


Much better diagnostic information can be obtained for a SQL statement’s performance by using InfiniDB’s supplied tracing utility, caltrace. The basic steps to using InfiniDB’s SQL tracing utility are: 

Start the trace for the particular session
Execute the SQL statement in question
Review the trace collected for the statement

As an example, the following session starts a trace, issues a query against a 6 million row fact table and 300,000 row dimension table, and then reviews the output from the trace:


The caltrace utility allows you to see the various steps a query takes to be satisfied including the objects involved, the physical and logical I/O involved, the elapsed time for each step, the rows touched, etc.