PgHero
No long running queries
Connections healthy 5
Vacuuming healthy
No columns near integer overflow
No invalid indexes or constraints
No duplicate indexes
No suggested indexes
3 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
12 min 40% 739 ms 936 paras · details
UPDATE "extids" SET "current_value" = ?, "lock_version" = ?, "updated_at" = ?  WHERE (("extids"."id" = ? AND "extids"."lock_version" = ?))
4 min 14% 142 ms 1,709 paras · 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 = ? and iwd.item_id = ?) ORDER BY  it.id desc LIMIT ?
0 min 1% 59 ms 333 paras · details
SELECT     id,name,rc_code,dispensing_unit_id,item_subtype_id FROM       "items"  WHERE     ("items"."is_consignment" = ?) AND (item_subtype_id in (select id from item_subtypes where item_type_id in(select id from item_types where item_group_id in(select id from item_groups where store_category_id = ?) ) ) and id in(select iwd.item_id from inventory_statuses as iss inner join item_with_details as iwd on iss.item_with_detail_id=iwd.id where iss.quantity > ? and iss.inventory_head_id=? and iss.flag=? and (iwd.expiry_date >= ? or iwd.expiry_date is null)) and is_asset = ? and is_consignment = ? and status = ?) ORDER BY  LOWER(name)