explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J6xC

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.345 ↑ 1.0 1 1

Limit (cost=3,017.90..3,017.90 rows=1 width=28) (actual time=0.344..0.345 rows=1 loops=1)

2. 0.022 0.344 ↑ 2,847.0 1 1

Sort (cost=3,017.90..3,025.02 rows=2,847 width=28) (actual time=0.344..0.344 rows=1 loops=1)

  • Sort Key: pay."timestamp
  • Sort Method: quicksort Memory: 25kB
3. 0.005 0.322 ↑ 1,423.5 2 1

Merge Left Join (cost=2,606.29..3,003.66 rows=2,847 width=28) (actual time=0.312..0.322 rows=2 loops=1)

  • Merge Cond: (reg.action_id = pay.action_id)
  • Join Filter: (pay.ad_id = reg.ad_id)
4. 0.009 0.295 ↑ 206.0 2 1

Merge Left Join (cost=1,302.29..1,648.75 rows=412 width=28) (actual time=0.288..0.295 rows=2 loops=1)

  • Merge Cond: (reg.action_id = pub.action_id)
  • Join Filter: (pub.ad_id = reg.ad_id)
5. 0.011 0.011 ↑ 41.5 2 1

Index Scan using index_action_states_ad_id_action_id_state_reg on action_states reg (cost=0.00..339.05 rows=83 width=20) (actual time=0.009..0.011 rows=2 loops=1)

  • Index Cond: (ad_id = 68,820,852)
6. 0.019 0.275 ↑ 19.0 2 1

Sort (cost=1,302.29..1,302.38 rows=38 width=16) (actual time=0.275..0.275 rows=2 loops=1)

  • Sort Key: pub.action_id
  • Sort Method: quicksort Memory: 25kB
7. 0.256 0.256 ↑ 19.0 2 1

Index Scan using index_action_states_ad_id_action_id_state_state_id on action_states pub (cost=0.00..1,301.29 rows=38 width=16) (actual time=0.112..0.256 rows=2 loops=1)

  • Index Cond: (ad_id = 68,820,852)
  • Filter: ((transition)::text = 'accept'::text)
  • Rows Removed by Filter: 8
8. 0.011 0.022 ↑ 26.5 2 1

Sort (cost=1,304.01..1,304.14 rows=53 width=16) (actual time=0.020..0.022 rows=2 loops=1)

  • Sort Key: pay.action_id
  • Sort Method: quicksort Memory: 25kB
9. 0.011 0.011 ↑ 26.5 2 1

Index Scan using index_action_states_ad_id_action_id_state_state_id on action_states pay (cost=0.00..1,302.49 rows=53 width=16) (actual time=0.006..0.011 rows=2 loops=1)

  • Index Cond: (ad_id = 68,820,852)
  • Filter: ((transition)::text = ANY ('{pay,verify,adminclear,import,cleared_by}'::text[]))
  • Rows Removed by Filter: 8
Total runtime : 0.437 ms