explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 48dU

Settings
# exclusive inclusive rows x rows loops node
1. 3.522 52,654.954 ↑ 1,000.0 1 1

GroupAggregate (cost=338,141.93..338,776.93 rows=1,000 width=100) (actual time=52,654.954..52,654.954 rows=1 loops=1)

  • Group Key: t.object_id, t.region_code
  • Buffers: shared hit=41248 read=9491
  • I/O Timings: read=157107.341
2. 8.900 52,651.432 ↑ 1.0 10,000 1

Sort (cost=338,141.93..338,166.93 rows=10,000 width=16) (actual time=52,650.929..52,651.432 rows=10,000 loops=1)

  • Sort Key: t.object_id, t.region_code
  • Sort Method: quicksort Memory: 853kB
  • Buffers: shared hit=41248 read=9491
  • I/O Timings: read=157107.341
3. 5.782 52,642.532 ↑ 1.0 10,000 1

Subquery Scan on t (cost=1,003.65..337,042.58 rows=10,000 width=16) (actual time=1.032..52,642.532 rows=10,000 loops=1)

  • Buffers: shared hit=41248 read=9491
  • I/O Timings: read=157107.341
4. 4.869 52,636.750 ↑ 1.0 10,000 1

Limit (cost=1,003.65..336,942.58 rows=10,000 width=16) (actual time=1.031..52,636.750 rows=10,000 loops=1)

  • Buffers: shared hit=41248 read=9491
  • I/O Timings: read=157107.341
5.          

Initplan (for Limit)

6. 0.039 0.039 ↑ 1.0 1 1

Seq Scan on "r$region_code" rrc (cost=0.00..3.09 rows=1 width=3) (actual time=0.027..0.039 rows=1 loops=1)

  • Filter: ((kladr_code)::text = '52'::text)
  • Rows Removed by Filter: 86
  • Buffers: shared hit=2
7. 112.825 52,631.842 ↑ 15.9 10,000 1

Gather (cost=1,000.57..5,343,437.25 rows=159,030 width=16) (actual time=1.029..52,631.842 rows=10,000 loops=1)

  • Workers Planned: 2
  • Params Evaluated: $0
  • Workers Launched: 2
  • Buffers: shared hit=41248 read=9491
  • I/O Timings: read=157107.341
8. 33.199 52,519.017 ↑ 19.9 3,336 3 / 3

Nested Loop (cost=0.57..5,326,534.25 rows=66,262 width=16) (actual time=0.395..52,519.017 rows=3,336 loops=3)

  • Buffers: shared hit=41246 read=9491
  • I/O Timings: read=157107.341
9. 20.546 20.546 ↑ 19.9 3,336 3 / 3

Parallel Seq Scan on mun_hierarchy mh (cost=0.00..4,804,943.67 rows=66,262 width=91) (actual time=0.049..20.546 rows=3,336 loops=3)

  • Filter: (is_active AND (nlevel(ltree_path) >= 0) AND ("substring"((oktmo)::text, 1, 2) = ($0)::text))
  • Rows Removed by Filter: 2513
  • Buffers: shared hit=11 read=652
  • I/O Timings: read=8.389
10. 52,465.272 52,465.272 ↑ 1.0 1 10,008 / 3

Index Scan using "pk$reestr_object" on reestr_object ro (cost=0.57..7.86 rows=1 width=16) (actual time=15.727..15.727 rows=1 loops=10,008)

  • Index Cond: (object_id = mh.object_id)
  • Buffers: shared hit=41235 read=8839
  • I/O Timings: read=157098.952
Planning time : 0.747 ms
Execution time : 52,655.190 ms