explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5tgu

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

Nested Loop (cost=1,001.17..145,193.53 rows=85,759 width=244) (actual time=261.416..2,056.238 rows=166,446 loops=1)

  • loops=1)
  • loops=3)
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. 1,542.244 2,033.911 ↓ 1.9 166,446 1

Merge Join (cost=1,001.17..144,334.86 rows=85,759 width=235) (actual time=261.405..2,033.911 rows=166,446 loops=1)

  • Merge Cond: (ff.enrolled_face_id = ef.id)
  • -> Gather Merge (cost=1,000.89..4664982.45 rows=2,346,113 width=129) (actual time=2.883..1950.538 rows=310,162
  • Workers Planned: 2
  • Workers Launched: 2
  • -> Nested Loop (cost=0.87..4393182.77 rows=977,547 width=129) (actual time=0.022..591.223 rows=103,417
4. 94.503 94.503 ↑ 42.4 130,392 3 / 3

Parallel Index Scan using found_face_enrolled_face_id_certainty_idx on found_face ff (cost=0.43..1,320,784.49 rows=5,523,905 width=88) (actual time=0.007..94.503 rows=130,392 loops=3)

5. 391.176 391.176 ↑ 1.0 1 391,176 / 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,176)

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

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

7. 0.006 0.109 ↑ 1.1 13 1 / 3

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

8. 0.094 0.094 ↑ 1.1 13 1 / 3

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

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

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

10. 0.006 0.006 ↑ 1.0 1 1 / 3

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

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