explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kwBG

Settings
# exclusive inclusive rows x rows loops node
1. 0.117 3,277.615 ↓ 67.0 67 1

Nested Loop (cost=50,211.93..54,477.12 rows=1 width=134) (actual time=2,241.812..3,277.615 rows=67 loops=1)

2. 0.663 3,277.096 ↓ 67.0 67 1

Nested Loop (cost=50,211.65..54,476.79 rows=1 width=245) (actual time=2,241.786..3,277.096 rows=67 loops=1)

3. 0.282 3,275.776 ↓ 73.0 73 1

Merge Join (cost=50,211.37..54,474.67 rows=1 width=198) (actual time=2,241.753..3,275.776 rows=73 loops=1)

  • Merge Cond: ((protection_job_runs_master.cluster_identifier)::text = (registered_sources.cluster_identifier)::text)
  • Join Filter: (registered_sources.source_id = protection_job_runs_master.parent_source_id)
  • Rows Removed by Join Filter: 1060
4. 455.685 3,274.697 ↑ 864.7 73 1

GroupAggregate (cost=50,102.12..53,573.89 rows=63,123 width=134) (actual time=2,241.054..3,274.697 rows=73 loops=1)

  • Group Key: protection_job_runs_master.cluster_identifier, protection_job_runs_master.parent_source_id, protection_job_runs_master.view_box_id, protection_job_runs_master.job_id
5. 1,761.643 2,819.012 ↓ 13.0 822,941 1

Sort (cost=50,102.12..50,259.93 rows=63,123 width=74) (actual time=2,240.860..2,819.012 rows=822,941 loops=1)

  • Sort Key: protection_job_runs_master.cluster_identifier, protection_job_runs_master.parent_source_id, protection_job_runs_master.view_box_id, protection_job_runs_master.job_id
  • Sort Method: external merge Disk: 62704kB
6. 278.932 1,057.369 ↓ 13.0 822,941 1

Hash Join (cost=176.92..42,262.36 rows=63,123 width=74) (actual time=0.745..1,057.369 rows=822,941 loops=1)

  • Hash Cond: (((protection_job_runs_master.cluster_identifier)::text = (registered_sources_1.cluster_identifier)::text) AND (protection_job_runs_master.parent_source_id = registered_sources_1.source_id))
7. 329.808 777.836 ↓ 4.0 1,000,602 1

Hash Join (cost=111.06..40,302.58 rows=252,492 width=104) (actual time=0.135..777.836 rows=1,000,602 loops=1)

  • Hash Cond: (((protection_job_runs_master.cluster_identifier)::text = (view_boxes_1.cluster_identifier)::text) AND (protection_job_runs_master.view_box_id = view_boxes_1.view_box_id))
8. 88.156 447.918 ↑ 1.0 1,009,966 1

Append (cost=0.00..32,616.58 rows=1,009,967 width=74) (actual time=0.016..447.918 rows=1,009,966 loops=1)

9. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on protection_job_runs_master (cost=0.00..0.00 rows=1 width=190) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((account_id)::text = '0015000002I3CkVAAV'::text)
10. 359.759 359.759 ↑ 1.0 1,009,966 1

Seq Scan on protection_job_runs_0015000002i3ckvaav (cost=0.00..32,616.58 rows=1,009,966 width=74) (actual time=0.012..359.759 rows=1,009,966 loops=1)

  • Filter: ((account_id)::text = '0015000002I3CkVAAV'::text)
11. 0.005 0.110 ↑ 1.1 37 1

Hash (cost=110.45..110.45 rows=41 width=38) (actual time=0.110..0.110 rows=37 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
12. 0.056 0.105 ↑ 1.1 37 1

Bitmap Heap Scan on view_boxes view_boxes_1 (cost=30.30..110.45 rows=41 width=38) (actual time=0.055..0.105 rows=37 loops=1)

  • Recheck Cond: ((cluster_identifier)::text = ANY ('{2690990343931928:1548976579658,4753914011867584:1537769063609,4590240874833370:1553378360317,3358568177796484:1552939875724,3773445208992781:1552938645523,8374834709413972:1535586101500,1616226053966050:1530308452261}'::text[]))
  • Heap Blocks: exact=21
13. 0.049 0.049 ↑ 1.1 37 1

Bitmap Index Scan on view_boxes_cid_vuid (cost=0.00..30.29 rows=41 width=0) (actual time=0.048..0.049 rows=37 loops=1)

  • Index Cond: ((cluster_identifier)::text = ANY ('{2690990343931928:1548976579658,4753914011867584:1537769063609,4590240874833370:1553378360317,3358568177796484:1552939875724,3773445208992781:1552938645523,8374834709413972:1535586101500,1616226053966050:1530308452261}'::text[]))
14. 0.007 0.601 ↑ 1.0 39 1

Hash (cost=65.27..65.27 rows=39 width=38) (actual time=0.601..0.601 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
15. 0.022 0.594 ↑ 1.0 39 1

HashAggregate (cost=64.88..65.27 rows=39 width=38) (actual time=0.588..0.594 rows=39 loops=1)

  • Group Key: (registered_sources_1.cluster_identifier)::text, registered_sources_1.source_id
16. 0.572 0.572 ↑ 1.0 39 1

Seq Scan on registered_sources registered_sources_1 (cost=0.00..64.68 rows=39 width=38) (actual time=0.018..0.572 rows=39 loops=1)

  • Filter: ((cluster_identifier)::text = ANY ('{2690990343931928:1548976579658,4753914011867584:1537769063609,4590240874833370:1553378360317,3358568177796484:1552939875724,3773445208992781:1552938645523,8374834709413972:1535586101500,1616226053966050:1530308452261}'::text[]))
  • Rows Removed by Filter: 1544
17. 0.087 0.797 ↓ 1,123.0 1,123 1

Materialize (cost=109.25..109.49 rows=1 width=80) (actual time=0.678..0.797 rows=1,123 loops=1)

18. 0.031 0.710 ↓ 39.0 39 1

Merge Join (cost=109.25..109.49 rows=1 width=80) (actual time=0.673..0.710 rows=39 loops=1)

  • Merge Cond: ((registered_sources.cluster_identifier)::text = (cluster.cluster_identifier)::text)
19. 0.039 0.599 ↑ 1.0 39 1

Sort (cost=65.71..65.81 rows=39 width=38) (actual time=0.593..0.599 rows=39 loops=1)

  • Sort Key: registered_sources.cluster_identifier
  • Sort Method: quicksort Memory: 28kB
20. 0.560 0.560 ↑ 1.0 39 1

Seq Scan on registered_sources (cost=0.00..64.68 rows=39 width=38) (actual time=0.029..0.560 rows=39 loops=1)

  • Rows Removed by Filter: 1544
21. 0.009 0.080 ↓ 5.3 37 1

Sort (cost=43.53..43.55 rows=7 width=42) (actual time=0.076..0.080 rows=37 loops=1)

  • Sort Key: cluster.cluster_identifier
  • Sort Method: quicksort Memory: 25kB
22. 0.016 0.071 ↑ 1.2 6 1

Bitmap Heap Scan on cluster (cost=26.00..43.44 rows=7 width=42) (actual time=0.062..0.071 rows=6 loops=1)

  • Heap Blocks: exact=4
23. 0.055 0.055 ↑ 1.2 6 1

Bitmap Index Scan on cluster_pkey (cost=0.00..25.99 rows=7 width=0) (actual time=0.055..0.055 rows=6 loops=1)

24. 0.657 0.657 ↑ 1.0 1 73

Index Scan using protection_jobs_pkey on protection_jobs (cost=0.29..2.12 rows=1 width=63) (actual time=0.009..0.009 rows=1 loops=73)

25. 0.402 0.402 ↑ 1.0 1 67

Index Scan using view_boxes_pkey on view_boxes (cost=0.28..0.31 rows=1 width=55) (actual time=0.005..0.006 rows=1 loops=67)

  • Index Cond: (((cluster_identifier)::text = (protection_job_runs_master.cluster_identifier)::text) AND (view_box_id = protection_job_runs_master.view_box_id))