explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yefr

Settings
# exclusive inclusive rows x rows loops node
1. 0.203 21,544.526 ↓ 2.5 821 1

Unique (cost=1,819,430.97..1,819,432.60 rows=327 width=41) (actual time=21,544.258..21,544.526 rows=821 loops=1)

2. 3.304 21,544.323 ↓ 2.5 821 1

Sort (cost=1,819,430.97..1,819,431.79 rows=327 width=41) (actual time=21,544.257..21,544.323 rows=821 loops=1)

  • Sort Key: ps.id
  • Sort Method: quicksort Memory: 89kB
3. 5.282 21,541.019 ↓ 2.5 821 1

Gather (cost=1,001.25..1,819,417.31 rows=327 width=41) (actual time=10,503.584..21,541.019 rows=821 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 2.688 21,535.737 ↓ 2.0 274 3 / 3

Nested Loop (cost=1.25..1,818,384.61 rows=136 width=41) (actual time=10,362.952..21,535.737 rows=274 loops=3)

5. 62.541 21,497.807 ↑ 2.1 1,410 3 / 3

Nested Loop (cost=0.56..1,805,350.85 rows=2,971 width=82) (actual time=533.330..21,497.807 rows=1,410 loops=3)

6. 20,301.423 20,301.423 ↑ 1.2 51,538 3 / 3

Parallel Seq Scan on profiles p (cost=0.00..1,451,317.58 rows=62,242 width=41) (actual time=54.334..20,301.423 rows=51,538 loops=3)

  • Filter: (email IS NOT NULL)
  • Rows Removed by Filter: 7,827,633
7. 1,133.843 1,133.843 ↓ 0.0 0 154,615 / 3

Index Only Scan using user_categories_pkey on user_categories uc (cost=0.56..5.69 rows=1 width=41) (actual time=0.022..0.022 rows=0 loops=154,615)

  • Index Cond: ((id = (p.id)::text) AND (category_id = 'startup'::text))
  • Heap Fetches: 581
8. 35.242 35.242 ↓ 0.0 0 4,229 / 3

Index Only Scan using profile_site_pkey on profile_site ps (cost=0.69..4.39 rows=1 width=41) (actual time=0.025..0.025 rows=0 loops=4,229)

  • Index Cond: ((id = (uc.id)::text) AND (site_id = '5e55213d0d8cdf000726e813'::text))
  • Heap Fetches: 244
Planning time : 0.821 ms
Execution time : 21,544.821 ms