explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T6tA

Settings
# exclusive inclusive rows x rows loops node
1. 22.968 2,014.678 ↓ 1.9 166,446 1

Nested Loop (cost=1,001.17..145,206.25 rows=85,765 width=244) (actual time=299.043..2,014.678 rows=166,446 loops=1)

2. 0.013 0.013 ↑ 1.0 1 1

Seq Scan on source src (cost=0.00..1.09 rows=1 width=25) (actual time=0.008..0.013 rows=1 loops=1)

  • Filter: (id = '0aff17b3-fba5-4fca-94bd-805a16afd613'::uuid)
  • Rows Removed by Filter: 6
3. 69.002 1,991.697 ↓ 1.9 166,446 1

Merge Join (cost=1,001.17..144,347.51 rows=85,765 width=235) (actual time=299.032..1,991.697 rows=166,446 loops=1)

  • Merge Cond: (ff.enrolled_face_id = ef.id)
4. 1,316.289 1,902.076 ↑ 7.6 310,162 1

Gather Merge (cost=1,000.89..4,665,343.67 rows=2,346,283 width=129) (actual time=3.096..1,902.076 rows=310,162 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 99.937 585.787 ↑ 9.5 103,424 3 / 3

Nested Loop (cost=0.87..4,393,524.37 rows=977,618 width=129) (actual time=0.024..585.787 rows=103,424 loops=3)

6. 94.531 94.531 ↑ 42.4 130,440 3 / 3

Parallel Index Scan using found_face_enrolled_face_id_certainty_idx on found_face ff (cost=0.43..1,320,885.24 rows=5,524,306 width=88) (actual time=0.008..94.531 rows=130,440 loops=3)

7. 391.319 391.319 ↑ 1.0 1 391,319 / 3

Index Scan using source_image_pkey on source_image si (cost=0.43..0.56 rows=1 width=57) (actual time=0.003..0.003 rows=1 loops=391,319)

  • Index Cond: (id = ff.source_image_id)
  • Filter: (source_id = '0aff17b3-fba5-4fca-94bd-805a16afd613'::uuid)
  • Rows Removed by Filter: 0
8. 20.244 20.619 ↓ 11,015.2 154,213 1

Materialize (cost=0.27..86.84 rows=14 width=122) (actual time=0.122..20.619 rows=154,213 loops=1)

9. 0.028 0.375 ↑ 1.1 13 1

Nested Loop (cost=0.27..86.80 rows=14 width=122) (actual time=0.119..0.375 rows=13 loops=1)

10. 0.321 0.321 ↑ 1.1 13 1

Index Scan using enrolled_face_pkey on enrolled_face ef (cost=0.27..82.97 rows=14 width=108) (actual time=0.105..0.321 rows=13 loops=1)

  • Filter: (person_id = '09f34426-2e19-4d78-ace4-9c83d054a056'::uuid)
  • Rows Removed by Filter: 374
11. 0.003 0.026 ↑ 1.0 1 13

Materialize (cost=0.00..3.66 rows=1 width=30) (actual time=0.001..0.002 rows=1 loops=13)

12. 0.023 0.023 ↑ 1.0 1 1

Seq Scan on person p (cost=0.00..3.65 rows=1 width=30) (actual time=0.010..0.023 rows=1 loops=1)

  • Filter: (id = '09f34426-2e19-4d78-ace4-9c83d054a056'::uuid)
  • Rows Removed by Filter: 141
Planning time : 1.386 ms
Execution time : 2,023.555 ms