explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ojf1

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 2,456.996 ↑ 1.0 24 1

Limit (cost=92,957.02..92,957.08 rows=24 width=227) (actual time=2,456.994..2,456.996 rows=24 loops=1)

2. 23.600 2,456.994 ↑ 4,992.0 24 1

Sort (cost=92,957.02..93,256.54 rows=119,809 width=227) (actual time=2,456.993..2,456.994 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 12.904 2,433.394 ↑ 1.6 76,743 1

Subquery Scan on cc (cost=86,017.11..89,611.38 rows=119,809 width=227) (actual time=2,347.697..2,433.394 rows=76,743 loops=1)

4. 25.955 2,420.490 ↑ 1.6 76,743 1

Unique (cost=86,017.11..88,413.29 rows=119,809 width=235) (actual time=2,347.696..2,420.490 rows=76,743 loops=1)

5. 34.733 2,394.535 ↑ 1.5 78,544 1

Group (cost=86,017.11..88,113.76 rows=119,809 width=235) (actual time=2,347.694..2,394.535 rows=78,544 loops=1)

  • Group Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
6. 504.264 2,359.802 ↑ 1.0 119,151 1

Sort (cost=86,017.11..86,316.63 rows=119,809 width=235) (actual time=2,347.692..2,359.802 rows=119,151 loops=1)

  • Sort Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
  • Sort Method: quicksort Memory: 43551kB
7. 127.040 1,855.538 ↑ 1.0 119,151 1

Hash Right Join (cost=66,685.90..75,910.99 rows=119,809 width=235) (actual time=1,716.621..1,855.538 rows=119,151 loops=1)

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

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

9. 41.259 1,716.239 ↑ 1.0 76,743 1

Hash (cost=65,726.08..65,726.08 rows=76,786 width=228) (actual time=1,716.239..1,716.239 rows=76,743 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 20094kB
10. 123.004 1,674.980 ↑ 1.0 76,743 1

Hash Right Join (cost=63,964.38..65,726.08 rows=76,786 width=228) (actual time=493.289..1,674.980 rows=76,743 loops=1)

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

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

12. 289.554 509.836 ↓ 723.7 144,734 1

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

  • Group Key: videoexporthistory_v2.relatedactionid
13. 32.281 220.282 ↑ 1.0 967,975 1

Append (cost=0.00..52,933.27 rows=968,828 width=49) (actual time=0.004..220.282 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. 188.001 188.001 ↑ 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..188.001 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. 14.858 35.580 ↑ 1.0 76,743 1

Hash (cost=5,227.15..5,227.15 rows=76,786 width=160) (actual time=35.580..35.580 rows=76,743 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 12736kB
20. 20.722 20.722 ↑ 1.0 76,743 1

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=76,786 width=160) (actual time=0.003..20.722 rows=76,743 loops=1)

  • Filter: ((start_action_date >= '2019-08-30 21:00:00'::timestamp without time zone) AND (start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 68600
Planning time : 0.703 ms
Execution time : 2,467.372 ms