explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ftxo

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 491.185 ↑ 1.0 1 1

Aggregate (cost=1,090.44..1,090.45 rows=1 width=0) (actual time=491.184..491.185 rows=1 loops=1)

2. 23.539 491.179 ↓ 0.0 0 1

Nested Loop (cost=0.00..1,090.40 rows=17 width=0) (actual time=491.179..491.179 rows=0 loops=1)

  • Join Filter: (ads.ad_id = ad_queues.ad_id)
3. 41.338 441.672 ↓ 618.3 8,656 1

Nested Loop (cost=0.00..1,086.27 rows=14 width=12) (actual time=0.309..441.672 rows=8,656 loops=1)

4. 182.322 183.934 ↓ 618.3 8,656 1

Nested Loop (cost=0.00..117.98 rows=14 width=16) (actual time=0.245..183.934 rows=8,656 loops=1)

  • -> Index Only Scan using idx_ad_actions_ad_id_action_id_current_state on ad_actions (cost=0.00..8.69 rows=114 width=12) (actual time=0.282..1.996 rows=104 loops
5. 0.186 1.612 ↓ 83.0 83 1

Nested Loop (cost=0.00..108.15 rows=1 width=4) (actual time=0.184..1.612 rows=83 loops=1)

  • Index Cond: (ad_id = ads.ad_id)
  • Heap Fetches: 7,278
6. 0.102 0.102 ↑ 1.0 1 1

Index Scan using users_email_key on users (cost=0.00..9.15 rows=1 width=4) (actual time=0.099..0.102 rows=1 loops=1)

  • Index Cond: ((email)::text = 'myynti@motor-outlet.fi'::text)
7. 1.324 1.324 ↓ 1.3 83 1

Index Only Scan using idx_ads_user_id_ad_id on ads (cost=0.00..98.38 rows=62 width=8) (actual time=0.078..1.324 rows=83 loops=1)

  • Index Cond: (user_id = users.user_id)
  • Heap Fetches: 79
8. 216.400 216.400 ↑ 1.0 1 8,656

Index Only Scan using action_states_state_id_key on action_states (cost=0.00..69.15 rows=1 width=4) (actual time=0.024..0.025 rows=1 loops=8,656)

  • Index Cond: (state_id = ad_actions.current_state)
  • Heap Fetches: 6,634
9. 25.968 25.968 ↓ 0.0 0 8,656

Index Only Scan using idx_ad_queues_action_id_ad_id on ad_queues (cost=0.00..0.28 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=8,656)

  • Index Cond: ((action_id = ad_actions.action_id) AND (ad_id = ad_actions.ad_id))
  • Heap Fetches: 0
Total runtime : 491.309 ms