explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7Qkj : counter query

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,231,819.334 ↑ 1.0 1 1

Finalize Aggregate (cost=758,918,392.90..758,918,392.91 rows=1 width=8) (actual time=2,231,819.334..2,231,819.334 rows=1 loops=1)

2. 16.020 2,231,829.469 ↓ 1.5 3 1

Gather (cost=758,918,392.69..758,918,392.90 rows=2 width=8) (actual time=2,231,816.057..2,231,829.469 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.982 2,231,813.449 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=758,917,392.69..758,917,392.70 rows=1 width=8) (actual time=2,231,813.449..2,231,813.449 rows=1 loops=3)

4. 780.873 2,231,811.467 ↑ 2.1 52,813 3 / 3

Parallel Hash Join (cost=140,406.73..758,917,119.53 rows=109,262 width=0) (actual time=2,231,769.451..2,231,811.467 rows=52,813 loops=3)

  • Hash Cond: (pulp_2to3_migration_pulp2content.pulp_id = pulp_2to3_migration_pulp2rpm.pulp2content_id)
5. 374,203.659 2,230,954.659 ↑ 1.4 264,359 3 / 3

Parallel Index Scan using pulp_2to3_migration_pulp2content_pkey on pulp_2to3_migration_pulp2content (cost=83,800.78..758,854,593.65 rows=362,843 width=16) (actual time=0.061..2,230,954.659 rows=264,359 loops=3)

  • Filter: ((pulp3_content_id IS NULL) OR (SubPlan 1))
  • Rows Removed by Filter: 39,000
6.          

SubPlan (for Parallel Index Scan)

7. 395,723.382 1,856,751.000 ↓ 1.1 156,771 117,000 / 3

Materialize (cost=83,800.35..87,433.51 rows=141,850 width=37) (actual time=28.661..47.609 rows=156,771 loops=117,000)

8. 42,464.408 1,461,027.618 ↓ 1.1 156,771 3,702 / 3

Unique (cost=83,800.35..85,615.26 rows=141,850 width=37) (actual time=905.767..1,183.977 rows=156,771 loops=3,702)

9. 1,270,886.728 1,418,563.210 ↑ 1.0 359,986 3,702 / 3

Sort (cost=83,800.35..84,707.81 rows=362,982 width=37) (actual time=905.767..1,149.565 rows=359,986 loops=3,702)

  • Sort Key: u0.pulp2_unit_id
  • Sort Method: external merge Disk: 16,600kB
  • Worker 0: Sort Method: external merge Disk: 16,600kB
  • Worker 1: Sort Method: external merge Disk: 16,600kB
10. 147,676.482 147,676.482 ↑ 1.0 359,986 3,702 / 3

Seq Scan on pulp_2to3_migration_pulp2lazycatalog u0 (cost=0.00..40,353.80 rows=362,982 width=37) (actual time=0.005..119.673 rows=359,986 loops=3,702)

  • Filter: (NOT is_migrated)
  • Rows Removed by Filter: 267,794
11. 21.646 75.935 ↑ 1.2 91,813 3 / 3

Parallel Hash (cost=54,613.76..54,613.76 rows=114,576 width=16) (actual time=75.935..75.935 rows=91,813 loops=3)

  • Buckets: 131,072 Batches: 8 Memory Usage: 2,688kB
12. 54.289 54.289 ↑ 1.2 91,813 3 / 3

Parallel Seq Scan on pulp_2to3_migration_pulp2rpm (cost=0.00..54,613.76 rows=114,576 width=16) (actual time=0.009..54.289 rows=91,813 loops=3)

Planning time : 0.230 ms
Execution time : 2,231,833.396 ms