explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ku1

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 3,004.867 ↑ 1.0 26 1

Limit (cost=62,499.42..62,502.45 rows=26 width=1,521) (actual time=2,995.637..3,004.867 rows=26 loops=1)

2. 0.000 3,004.860 ↑ 5.3 26 1

Gather Merge (cost=62,499.42..62,515.52 rows=138 width=1,521) (actual time=2,995.636..3,004.860 rows=26 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 50.403 8,893.980 ↑ 1.1 60 3

Sort (cost=61,499.39..61,499.57 rows=69 width=1,521) (actual time=2,964.651..2,964.660 rows=60 loops=3)

  • Sort Key: users.last_machine_score DESC NULLS LAST, candidate_profiles.created_at DESC NULLS LAST
  • Sort Method: quicksort Memory: 1296kB
4. 13.261 8,843.577 ↓ 15.5 1,068 3

Nested Loop (cost=2.12..61,497.29 rows=69 width=1,521) (actual time=8.765..2,947.859 rows=1,068 loops=3)

5. 7.047 7,912.266 ↓ 3.9 1,749 3

Nested Loop (cost=1.69..59,169.50 rows=449 width=1,513) (actual time=5.869..2,637.422 rows=1,749 loops=3)

6. 103.161 174.639 ↓ 3.9 16,518 3

Hash Join (cost=1.26..8,259.44 rows=4,268 width=4) (actual time=2.098..58.213 rows=16,518 loops=3)

  • Hash Cond: (places.market_id = markets.id)
7. 71.190 71.190 ↑ 1.2 68,290 3

Parallel Seq Scan on places (cost=0.00..7,986.62 rows=85,362 width=8) (actual time=0.369..23.730 rows=68,290 loops=3)

8. 0.018 0.288 ↓ 7.0 7 3

Hash (cost=1.25..1.25 rows=1 width=4) (actual time=0.096..0.096 rows=7 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.270 0.270 ↓ 7.0 7 3

Seq Scan on markets (cost=0.00..1.25 rows=1 width=4) (actual time=0.083..0.090 rows=7 loops=3)

  • Filter: (market_region_id = 2)
  • Rows Removed by Filter: 13
10. 7,730.580 7,730.580 ↓ 0.0 0 49,555

Index Scan using index_users_on_place_id on users (cost=0.43..11.89 rows=4 width=1,513) (actual time=0.046..0.156 rows=0 loops=49,555)

  • Index Cond: (place_id = places.id)
  • Filter: ((deleted_at IS NULL) AND ((type)::text = 'Candidate'::text) AND ((curation_status)::text = 'machine_approved_state'::text))
  • Rows Removed by Filter: 13
11. 918.050 918.050 ↑ 1.0 1 5,246

Index Scan using candidate_profiles_pkey on candidate_profiles (cost=0.43..5.18 rows=1 width=12) (actual time=0.175..0.175 rows=1 loops=5,246)

  • Index Cond: (id = users.profile_id)
  • Filter: ((submitted_at < '2019-01-04 15:19:35.627425'::timestamp without time zone) AND (primary_role_id = 4))
  • Rows Removed by Filter: 0