PgHero
No long running queries
Connections healthy 9
Vacuuming healthy
No columns near integer overflow
No invalid indexes or constraints
No duplicate indexes
No suggested indexes
4 slow queries

Slow Queries

Slow queries take 20 ms or more on average and have been called at least 100 times.

Explain queries to see where to add indexes.

Total Time Average Time Calls
1 min 23% 576 ms 127 pghero · details
SELECT n.nspname AS table_schema, c.relname AS table, attname AS column, format_type(a.atttypid, a.atttypmod) AS column_type, pg_get_expr(d.adbin, d.adrelid) AS default_value FROM pg_catalog.pg_attribute a INNER JOIN pg_catalog.pg_class c ON c.oid = a.attrelid INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace INNER JOIN pg_catalog.pg_attrdef d ON (a.attrelid, a.attnum) = (d.adrelid, d.adnum) WHERE NOT a.attisdropped AND a.attnum > $1 AND pg_get_expr(d.adbin, d.adrelid) LIKE $2 AND n.nspname NOT LIKE $3 /*pghero*/
1 min 15% 23 ms 2,059 parasapp · details
SELECT     itd.* FROM       "inv_tran_details"  as itd inner join inventory_transactions as it on it.id = itd.inventory_transaction_id inner join item_with_details as iwd on itd.item_with_detail_id = iwd.id WHERE     (it.reference2 = $1 and iwd.item_id = $2) ORDER BY  it.id desc LIMIT $3
0 min 9% 195 ms 140 pghero · details
SELECT schemaname AS schema, t.relname AS table, ix.relname AS name, regexp_replace(pg_get_indexdef(i.indexrelid), $1, $2) AS columns, regexp_replace(pg_get_indexdef(i.indexrelid), $3, $4) AS using, indisunique AS unique, indisprimary AS primary, indisvalid AS valid, indexprs::text, indpred::text, pg_get_indexdef(i.indexrelid) AS definition FROM pg_index i INNER JOIN pg_class t ON t.oid = i.indrelid INNER JOIN pg_class ix ON ix.oid = i.indexrelid LEFT JOIN pg_stat_user_indexes ui ON ui.indexrelid = i.indexrelid WHERE schemaname IS NOT NULL ORDER BY 1, 2 /*pghero*/
0 min 3% 45 ms 186 pghero · details
SELECT n.nspname AS schema, c.relname AS relation, CASE WHEN c.relkind = $1 THEN $2 ELSE $3 END AS type, pg_table_size(c.oid) AS size_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname NOT IN ($4, $5) AND n.nspname !~ $6 AND c.relkind IN ($7, $8) ORDER BY pg_table_size(c.oid) DESC, 2 ASC /*pghero*/