Practical Query Analyzer Publisher's description
from Tom Copeland
Practical Query Analyzer produces HTML reports on query statistics.
Practical Query Analyzer produces HTML reports on the most frequent queries, slowest queries, queries by type (select/insert/update/delete), and more for both PostgreSQL and MySQL log files.
What's New in This Release:ï¿½ This release fixes a silly bug that prevented it from being run directly.
ï¿½ It has various internal improvements.
ï¿½ If you install it via RubyGems, you can run it using "pqa -f file1 [file2, etc.]".
ï¿½ PQA itself
ï¿½ PostgreSQL or MySQL installation.
You can install PQA by simply unzipping it into any directory. Then open a command line window, cd into the pqa-1.4 directory, and run it like this:
[tom@hal lib]$ ./pqa.rb -file ../sample/pglog_sample.log -normalize -top 5
645 queries (65 unique), longest ran in 0.370524 seconds), parsed in 0.088793 seconds
### Queries by type
SELECTs: 593 (92%)
INSERTs: 51 (8%)
UPDATEs: 1 (0%)
### 5 most frequent queries
61 times: SELECT total FROM forum_group_list_vw WHERE group_forum_id=''
46 times: SELECT plugin_id, plugin_name FROM plugins
46 times: INSERT INTO activity_log (day,hour,group_id,browser,ver,platform,time,page,type) VALUES (0,'','','','','','','','');
40 times: select classname from supported_languages where language_code = ''
40 times: SELECT language_code FROM supported_languages WHERE language_id=''
ï¿½ -file - required - The name of the data file to analyze
ï¿½ -top N - optional - "Top N queries", defaults to 10.
ï¿½ -format N - optional - Either "text" or "html", defaults to "text"
ï¿½ -normalize - optional - Removes quoted items and various bits of whitespaces
ï¿½ -logtype - optional - The type of log file: syslog, pglog, or mysql - defaults to pglog
Program Release Status:
Program Install Support: Install and Uninstall and Repair