explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 426p

Settings
# exclusive inclusive rows x rows loops node
1. 13.499 710.797 ↑ 1.0 1,000 1

Limit (cost=315,136.12..315,138.62 rows=1,000 width=189) (actual time=697.187..710.797 rows=1,000 loops=1)

2. 18.229 697.298 ↑ 5.1 1,000 1

Sort (cost=315,136.12..315,148.85 rows=5,090 width=189) (actual time=697.048..697.298 rows=1,000 loops=1)

  • Sort Key: mo_gzhi_mkd.sort, mo_gzhi_mkd.id DESC
  • Sort Method: top-N heapsort Memory: 554kB
3. 26.819 679.069 ↓ 11.6 59,004 1

Finalize GroupAggregate (cost=314,194.55..314,857.04 rows=5,090 width=189) (actual time=589.002..679.069 rows=59,004 loops=1)

  • Group Key: mo_gzhi_mkd.id
4. 41.866 652.250 ↓ 19.1 81,154 1

Gather Merge (cost=314,194.55..314,742.51 rows=4,242 width=149) (actual time=588.961..652.250 rows=81,154 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 19.250 610.384 ↓ 12.8 27,051 3 / 3

Partial GroupAggregate (cost=313,194.53..313,252.86 rows=2,121 width=149) (actual time=584.956..610.384 rows=27,051 loops=3)

  • Group Key: mo_gzhi_mkd.id
6. 25.696 591.134 ↓ 14.9 31,576 3 / 3

Sort (cost=313,194.53..313,199.83 rows=2,121 width=202) (actual time=584.924..591.134 rows=31,576 loops=3)

  • Sort Key: mo_gzhi_mkd.id DESC
  • Sort Method: quicksort Memory: 12,374kB
  • Worker 0: Sort Method: quicksort Memory: 10,537kB
  • Worker 1: Sort Method: quicksort Memory: 10,332kB
7. 20.934 565.438 ↓ 14.9 31,576 3 / 3

Parallel Hash Join (cost=249,051.83..313,077.34 rows=2,121 width=202) (actual time=93.001..565.438 rows=31,576 loops=3)

  • Hash Cond: (control_object.entity_id = mo_gzhi_mkd.id)
8. 218.750 501.131 ↑ 1.1 32,572 3 / 3

Parallel Hash Join (cost=241,053.14..304,983.90 rows=36,094 width=12) (actual time=49.447..501.131 rows=32,572 loops=3)

  • Hash Cond: (conrol_subject_control_object.control_object_id = control_object.id)
9. 233.345 233.345 ↑ 1.3 1,646,730 3 / 3

Parallel Seq Scan on conrol_subject_control_object (cost=0.00..58,526.95 rows=2,058,595 width=8) (actual time=0.013..233.345 rows=1,646,730 loops=3)

10. 9.491 49.036 ↑ 1.6 31,210 3 / 3

Parallel Hash (cost=240,415.79..240,415.79 rows=50,988 width=8) (actual time=49.035..49.036 rows=31,210 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 4,736kB
11. 35.511 39.545 ↑ 1.6 31,210 3 / 3

Parallel Bitmap Heap Scan on control_object (cost=7,460.92..240,415.79 rows=50,988 width=8) (actual time=13.157..39.545 rows=31,210 loops=3)

  • Recheck Cond: ((entity_table_name)::text = 'mo_gzhi_mkd'::text)
  • Heap Blocks: exact=2,728
12. 4.034 4.034 ↑ 1.3 93,630 1 / 3

Bitmap Index Scan on ix_entity_table_name (cost=0.00..7,430.33 rows=122,370 width=0) (actual time=12.103..12.103 rows=93,630 loops=1)

  • Index Cond: ((entity_table_name)::text = 'mo_gzhi_mkd'::text)
13. 12.382 43.373 ↑ 1.2 20,771 3 / 3

Parallel Hash (cost=7,677.42..7,677.42 rows=25,702 width=194) (actual time=43.373..43.373 rows=20,771 loops=3)

  • Buckets: 65,536 Batches: 1 Memory Usage: 14,528kB
14. 30.991 30.991 ↑ 1.2 20,771 3 / 3

Parallel Seq Scan on mo_gzhi_mkd (cost=0.00..7,677.42 rows=25,702 width=194) (actual time=0.015..30.991 rows=20,771 loops=3)

  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 869
Planning time : 0.671 ms
Execution time : 712.718 ms