analyze_pg_log [options] file ... Options: --sort-by-count, -c Sort by the number of each type of query (default) --sort-by-sql, -s Sort by the query text itself --sort-by-dupes, -d Sort by the ratio of instances of a query to unique instances of a query --sort-by-weight, -w Sort by the total time spent on each type of query --params, -p Show the unique parameter sets used for each query type --one-pid, -o Ignore entries for all but the first pid encountered. analyze_pg_log --help: Show this help message. analyze_pg_log --man: Show the full manual page. analyze_pg_log --version: Show the version number. #### murphy@genometest$ analyze_pg_log --one-pid egdata.2.2.log There are 21 unique basic queries: Fam Count Uniques TotalTime Avg-Time Query ----- ----- ------- --------- -------- ----- A 1 1 0.001548 0.001548 SELECT main.* FROM CustomFieldValues main WHERE ((main.CustomField = ?String-1?)) ORDER BY main.SortOrder ASC B 1 1 0.005947 0.005947 SELECT main.* FROM Tickets main WHERE ((main.EffectiveId = main.id)) AND ((main.Status != ?String-1?)) AND ((main.Type = ?String-2?)) AND\ ( ( (main.Status = ?String-3?)OR(main.Status = ?String-4?) ) AND ( (main.Queue = ?String-5?) ) ) ORDER BY main.Priority DESC LIMIT ?Num-6? ... ---- ----- ----- --------- Totals: 161 0.091403 Approx. elapsed time of this section of log is 4.594 seconds.