explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mY4Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.426 1,971.039 ↑ 36.9 260 1

Sort (cost=20,880.74..20,904.74 rows=9,600 width=27) (actual time=1,971.033..1,971.039 rows=260 loops=1)

  • Sort Key: aa.branch_name, aa_1.action
  • Sort Method: quicksort Memory: 45kB
2. 26.494 1,970.613 ↑ 36.9 260 1

HashAggregate (cost=20,053.75..20,149.75 rows=9,600 width=19) (actual time=1,970.571..1,970.613 rows=260 loops=1)

  • Group Key: aa.branch_name, aa_1.action
3. 109.188 1,944.119 ↓ 1.0 124,203 1

Merge Left Join (cost=16,500.53..19,122.24 rows=124,202 width=19) (actual time=1,762.952..1,944.119 rows=124,203 loops=1)

  • Merge Cond: (aa.id = aa_1.relatedactionid)
4. 56.398 56.398 ↑ 1.0 124,202 1

Index Scan using salestransaction_id_pk on salestransaction aa (cost=0.42..2,241.65 rows=124,202 width=57) (actual time=0.005..56.398 rows=124,202 loops=1)

5. 436.955 1,778.533 ↓ 26.6 123,920 1

Sort (cost=16,500.11..16,511.77 rows=4,665 width=45) (actual time=1,762.941..1,778.533 rows=123,920 loops=1)

  • Sort Key: aa_1.relatedactionid
  • Sort Method: quicksort Memory: 12754kB
6. 0.000 1,341.578 ↓ 26.6 123,920 1

Nested Loop (cost=16,079.04..16,215.83 rows=4,665 width=45) (actual time=450.506..1,341.578 rows=123,920 loops=1)

7. 272.207 493.164 ↓ 619.6 123,920 1

HashAggregate (cost=16,079.04..16,081.04 rows=200 width=49) (actual time=450.467..493.164 rows=123,920 loops=1)

  • Group Key: videoexporthistory_v2.relatedactionid
8. 31.371 220.957 ↑ 1.0 932,932 1

Append (cost=0.00..11,414.37 rows=932,933 width=49) (actual time=0.003..220.957 rows=932,932 loops=1)

9. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on videoexporthistory_v2 (cost=0.00..0.00 rows=1 width=40) (actual time=0.000..0.000 rows=0 loops=1)

10. 189.586 189.586 ↑ 1.0 932,932 1

Seq Scan on videoexporthistory_v2_0 (cost=0.00..11,414.37 rows=932,932 width=49) (actual time=0.002..189.586 rows=932,932 loops=1)

11. 495.680 867.440 ↑ 2.0 1 123,920

Append (cost=0.00..0.64 rows=2 width=48) (actual time=0.007..0.007 rows=1 loops=123,920)

12. 0.000 0.000 ↓ 0.0 0 123,920

Seq Scan on videoexporthistory_v2 aa_1 (cost=0.00..0.00 rows=1 width=44) (actual time=0.000..0.000 rows=0 loops=123,920)

  • Filter: ((videoexporthistory_v2.relatedactionid = relatedactionid) AND ((max(videoexporthistory_v2.actiontime)) = actiontime))
13. 371.760 371.760 ↑ 1.0 1 123,920

Index Scan using videoexporthistory_v2_0_actiontime_ix on videoexporthistory_v2_0 aa_2 (cost=0.42..0.64 rows=1 width=53) (actual time=0.003..0.003 rows=1 loops=123,920)

  • Index Cond: (actiontime = (max(videoexporthistory_v2.actiontime)))
  • Filter: (videoexporthistory_v2.relatedactionid = relatedactionid)
  • Rows Removed by Filter: 0
Planning time : 0.683 ms
Execution time : 1,974.172 ms