Christoph Dorn has posted a modification to this post from Eran Galperin about profiling your SQL scripts with the Zend_Db component from the Zend Framework. Christoph takes it one level further and adds on something even more handy - Firebug support.
He explains how to use Zend_Db_Profiler to analyze all SQL queries on a page and how to improve the performance of the queries by adding indexes. Here is a quick modification to his example that will send the profiling information to firebug instead of printing it to the page.
He points out the package you'll need to grab from the Zend Framework to make it happen as well as a bit of code you can use as a starting place to get things up and running.