Practical Query Analyzer 1.6 review
DownloadPractical Query Analyzer produces HTML reports on the most frequent queries, slowest queries, queries by type (select/insert/update/d
|
|
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.
Requirements:
Ruby
PQA itself
PostgreSQL or MySQL installation.
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=''
Parameters:
-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
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.]".
Practical Query Analyzer 1.6 keywords