explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uv6 : Limit (cost=115185.77..126149.87 rows=1 width=1233) (actual time=0.050..0.051 rows=0 loops=1) -> WindowAgg (cost=115185.77..126149.87 rows=1 width=1233) (actual time=0.047..0.048 rows=0 loops=1) -> Nested Loop Left Join (cost=115185.77..126149.86 rows=1 width=1225) (actual time=0.043..0.044 rows=0 loops=1) -> Nested Loop Left Join (cost=115185.35..126141.42 rows=1 width=1224) (actual time=0.040..0.041 rows=0 loops=1) Join Filter: (n.id = nh2.notice_id) -> Nested Loop Left Join (cost=100358.25..111131.01 rows=1 width=1216) (actual time=0.038..0.039 rows=0 loops=1) -> Index Scan Backward using idx_notice__organization_nc__date_in on notice n (cost=0.42..12.47 rows=1 width=1204) (actual time=0.035..0.036 rows=0 loops=1) Index Cond: ((organization_nc = 1) AND (date_in >= '2019-05-01 00:00:00'::timestamp without time zone) AND (date_in <= '2019-05-31 23:30:00'::timestamp without time zone)) Filter: (("r$notice_status_id" = 8) AND ((region)::text = '52'::text)) Rows Removed by Filter: 3 -> Hash Join (cost=100357.82..111118.53 rows=1 width=20) (never executed) Hash Cond: ((min(nh_1.id)) = nh.id) -> GroupAggregate (cost=100341.42..107074.06 rows=319054 width=16) (never executed) Group Key: nh_1.notice_id -> Sort (cost=100341.42..101522.12 rows=472281 width=16) (never executed) Sort Key: nh_1.notice_id -> Bitmap Heap Scan on notice_history nh_1 (cost=9116.61..47756.12 rows=472281 width=16) (never executed) Recheck Cond: ("r$notice_status_id" = 2) -> Bitmap Index Scan on idx_notice_history_notice_status_id (cost=0.00..8998.53 rows=472281 width=0) (never executed) Index Cond: ("r$notice_status_id" = 2) -> Hash (cost=16.37..16.37 rows=3 width=28) (never executed) -> Index Scan using idx_notice_history_notice_id on notice_history nh (cost=0.43..16.37 rows=3 width=28) (never executed) Index Cond: (n.id = notice_id) -> HashAggregate (cost=14827.11..14883.51 rows=5640 width=16) (never executed) Group Key: nh2.notice_id -> Bitmap Heap Scan on notice_history nh2 (cost=112.34..14798.78 rows=5666 width=16) (never executed) Recheck Cond: ("r$notice_status_id" = 11) -> Bitmap Index Scan on idx_notice_history_notice_status_id (cost=0.00..110.92 rows=5666 width=0) (never executed) Index Cond: ("r$notice_status_id" = 11) -> Index Scan using missing_address_pkey on missing_address ma (cost=0.42..8.44 rows=1 width=9) (never executed) Index Cond: (id = n.missing_address_id) Planning time: 2.025 ms Execution time: 0.366 ms

Settings
# exclusive inclusive rows x rows loops node
1. 0.158 55.012 ↑ 11.4 71 1

Sort (cost=146.63..148.65 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)

  • Sort Key: n.nspname, p.proname, (pg_get_function_arguments(p.oid))
  • Sort Method: quicksort Memory: 43kB
2. 1.378 54.854 ↑ 11.4 71 1

Hash Join (cost=1.14..107.61 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)

  • Hash Cond: (p.pronamespace = n.oid)
3. 53.465 53.465 ↓ 3.0 2,402 1

Seq Scan on pg_proc p (cost=0.00..89.30 rows=808 width=78) (actual time=0.052..53.465 rows=2,402 loops=1)

  • Filter: pg_function_is_visible(oid)
4. 0.004 0.011 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
5. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on pg_namespace n (cost=0.00..1.09 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: ((nspname <> 'pg_catalog'::name) AND (nspname <> 'information_schema'::name))