explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3tiX : query with select_related

Settings
# exclusive inclusive rows x rows loops node
1. 49.608 2,217,880.670 ↑ 1.7 158,438 1

Nested Loop Left Join (cost=83,801.62..1,821,703,352.24 rows=262,228 width=1,774) (actual time=2,216,212.579..2,217,880.670 rows=158,438 loops=1)

2. 49.667 2,217,831.062 ↑ 1.7 158,438 1

Nested Loop (cost=83,801.20..1,821,587,254.67 rows=262,228 width=1,714) (actual time=2,216,212.573..2,217,831.062 rows=158,438 loops=1)

3. 1,071,584.243 2,216,195.243 ↑ 1.1 793,076 1

Index Scan using pulp_2to3_migration_pulp2content_pulp3_content_id_6271a7bb on pulp_2to3_migration_pulp2content (cost=83,800.78..1,820,976,443.87 rows=870,824 width=254) (actual time=2,215,941.184..2,216,195.243 rows=793,076 loops=1)

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

SubPlan (for Index Scan)

5. 1,143,067.025 1,144,611.000 ↓ 1.1 156,771 117,000

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

6. 35.072 1,543.975 ↓ 1.1 156,771 1

Unique (cost=83,800.35..85,615.26 rows=141,850 width=37) (actual time=1,263.255..1,543.975 rows=156,771 loops=1)

7. 1,277.046 1,508.903 ↑ 1.0 359,986 1

Sort (cost=83,800.35..84,707.81 rows=362,982 width=37) (actual time=1,263.254..1,508.903 rows=359,986 loops=1)

  • Sort Key: u0.pulp2_unit_id
  • Sort Method: external merge Disk: 16,600kB
8. 231.857 231.857 ↑ 1.0 359,986 1

Seq Scan on pulp_2to3_migration_pulp2lazycatalog u0 (cost=0.00..40,353.80 rows=362,982 width=37) (actual time=0.014..231.857 rows=359,986 loops=1)

  • Filter: (NOT is_migrated)
  • Rows Removed by Filter: 267,794
9. 1,586.152 1,586.152 ↓ 0.0 0 793,076

Index Scan using pulp_2to3_migration_pulp2rpm_pulp2content_id_508869c4 on pulp_2to3_migration_pulp2rpm (cost=0.42..0.69 rows=1 width=1,460) (actual time=0.002..0.002 rows=0 loops=793,076)

  • Index Cond: (pulp2content_id = pulp_2to3_migration_pulp2content.pulp_id)
10. 0.000 0.000 ↓ 0.0 0 158,438

Index Scan using core_content_pkey on core_content (cost=0.42..0.44 rows=1 width=60) (actual time=0.000..0.000 rows=0 loops=158,438)

  • Index Cond: (pulp_id = pulp_2to3_migration_pulp2content.pulp3_content_id)
Planning time : 71.898 ms
Execution time : 2,217,903.433 ms