explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EvJG

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 3,361.311 ↑ 1.0 24 1

Limit (cost=113,160.60..113,160.66 rows=24 width=227) (actual time=3,361.308..3,361.311 rows=24 loops=1)

2. 62.521 3,361.309 ↑ 4,724.6 48 1

Sort (cost=113,160.54..113,727.48 rows=226,779 width=227) (actual time=3,361.306..3,361.309 rows=48 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 41kB
3. 27.861 3,298.788 ↑ 1.6 145,343 1

Subquery Scan on cc (cost=98,890.51..105,693.88 rows=226,779 width=227) (actual time=3,093.739..3,298.788 rows=145,343 loops=1)

4. 71.909 3,270.927 ↑ 1.6 145,343 1

Unique (cost=98,890.51..103,426.09 rows=226,779 width=235) (actual time=3,093.738..3,270.927 rows=145,343 loops=1)

5. 78.973 3,199.018 ↑ 1.5 148,690 1

Group (cost=98,890.51..102,859.14 rows=226,779 width=235) (actual time=3,093.737..3,199.018 rows=148,690 loops=1)

  • Group Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
6. 1,122.741 3,120.045 ↑ 1.0 226,778 1

Sort (cost=98,890.51..99,457.46 rows=226,779 width=235) (actual time=3,093.735..3,120.045 rows=226,778 loops=1)

  • Sort Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
  • Sort Method: quicksort Memory: 77357kB
7. 174.325 1,997.304 ↑ 1.0 226,778 1

Hash Right Join (cost=68,422.68..78,717.47 rows=226,779 width=235) (actual time=1,810.630..1,997.304 rows=226,778 loops=1)

  • Hash Cond: (salestransactionpayment.salestransaction_id = aa.id)
8. 12.404 12.404 ↑ 1.0 226,779 1

Seq Scan on salestransactionpayment (cost=0.00..4,908.79 rows=226,779 width=49) (actual time=0.004..12.404 rows=226,779 loops=1)

9. 75.706 1,810.575 ↓ 1.0 145,345 1

Hash (cost=66,605.89..66,605.89 rows=145,343 width=228) (actual time=1,810.575..1,810.575 rows=145,345 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 36912kB
10. 141.174 1,734.869 ↓ 1.0 145,345 1

Hash Right Join (cost=64,821.34..66,605.89 rows=145,343 width=228) (actual time=523.150..1,734.869 rows=145,345 loops=1)

  • Hash Cond: (aa_1.relatedactionid = aa.id)
11. 8.554 1,539.384 ↓ 29.9 144,735 1

Nested Loop (cost=57,777.41..59,446.91 rows=4,844 width=109) (actual time=468.786..1,539.384 rows=144,735 loops=1)

12. 292.561 517.692 ↓ 723.7 144,734 1

HashAggregate (cost=57,777.41..57,779.41 rows=200 width=49) (actual time=468.746..517.692 rows=144,734 loops=1)

  • Group Key: videoexporthistory_v2.relatedactionid
13. 33.663 225.131 ↑ 1.0 967,975 1

Append (cost=0.00..52,933.27 rows=968,828 width=49) (actual time=0.003..225.131 rows=967,975 loops=1)

14. 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)

15. 191.468 191.468 ↑ 1.0 967,975 1

Seq Scan on videoexporthistory_v2_0 (cost=0.00..52,933.27 rows=968,827 width=49) (actual time=0.003..191.468 rows=967,975 loops=1)

16. 578.936 1,013.138 ↑ 2.0 1 144,734

Append (cost=0.00..8.31 rows=2 width=108) (actual time=0.007..0.007 rows=1 loops=144,734)

17. 0.000 0.000 ↓ 0.0 0 144,734

Seq Scan on videoexporthistory_v2 aa_1 (cost=0.00..0.00 rows=1 width=108) (actual time=0.000..0.000 rows=0 loops=144,734)

  • Filter: ((videoexporthistory_v2.relatedactionid = relatedactionid) AND ((max(videoexporthistory_v2.actiontime)) = actiontime))
18. 434.202 434.202 ↑ 1.0 1 144,734

Index Scan using videoexporthistory_v2_0_actiontime_ix on videoexporthistory_v2_0 aa_2 (cost=0.42..8.31 rows=1 width=109) (actual time=0.003..0.003 rows=1 loops=144,734)

  • Index Cond: (actiontime = (max(videoexporthistory_v2.actiontime)))
  • Filter: (videoexporthistory_v2.relatedactionid = relatedactionid)
  • Rows Removed by Filter: 0
19. 27.966 54.311 ↑ 1.0 145,343 1

Hash (cost=5,227.15..5,227.15 rows=145,343 width=160) (actual time=54.311..54.311 rows=145,343 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 24121kB
20. 26.345 26.345 ↑ 1.0 145,343 1

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=145,343 width=160) (actual time=0.003..26.345 rows=145,343 loops=1)

  • Filter: ((start_action_date >= '2019-01-30 21:00:00'::timestamp without time zone) AND (start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
Planning time : 0.710 ms
Execution time : 3,378.070 ms