explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ySmD

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 6,196.010 ↑ 1.0 24 1

Limit (cost=92,481.87..92,481.93 rows=24 width=227) (actual time=6,196.004..6,196.010 rows=24 loops=1)

2. 69.396 6,196.006 ↑ 4,949.8 24 1

Sort (cost=92,481.87..92,778.86 rows=118,795 width=227) (actual time=6,196.003..6,196.006 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 15.454 6,126.610 ↑ 1.5 77,941 1

Subquery Scan on cc (cost=85,897.68..89,164.54 rows=118,795 width=227) (actual time=6,001.042..6,126.610 rows=77,941 loops=1)

4. 87.397 6,111.156 ↑ 1.5 77,941 1

Group (cost=85,897.68..87,976.59 rows=118,795 width=235) (actual time=6,001.041..6,111.156 rows=77,941 loops=1)

  • Group Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
5. 1,348.889 6,023.759 ↑ 1.0 118,205 1

Sort (cost=85,897.68..86,194.67 rows=118,795 width=235) (actual time=6,001.036..6,023.759 rows=118,205 loops=1)

  • Sort Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
  • Sort Method: quicksort Memory: 43279kB
6. 291.819 4,674.870 ↑ 1.0 118,205 1

Hash Right Join (cost=66,669.43..75,884.38 rows=118,795 width=235) (actual time=4,351.192..4,674.870 rows=118,205 loops=1)

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

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

8. 112.763 4,350.416 ↓ 1.0 76,149 1

Hash (cost=65,717.73..65,717.73 rows=76,136 width=228) (actual time=4,350.416..4,350.416 rows=76,149 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 19947kB
9. 252.972 4,237.653 ↓ 1.0 76,149 1

Hash Right Join (cost=63,956.26..65,717.73 rows=76,136 width=228) (actual time=1,262.312..4,237.653 rows=76,149 loops=1)

  • Hash Cond: (aa_1.relatedactionid = aa.id)
10. 153.998 3,910.097 ↓ 29.9 144,735 1

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

11. 753.645 1,295.621 ↓ 723.7 144,734 1

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

  • Group Key: videoexporthistory_v2.relatedactionid
12. 90.738 541.976 ↑ 1.0 967,975 1

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

13. 0.001 0.001 ↓ 0.0 0 1

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

14. 451.237 451.237 ↑ 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.006..451.237 rows=967,975 loops=1)

15. 1,592.074 2,460.478 ↑ 2.0 1 144,734

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

16. 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))
17. 868.404 868.404 ↑ 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.006..0.006 rows=1 loops=144,734)

  • Index Cond: (actiontime = (max(videoexporthistory_v2.actiontime)))
  • Filter: (videoexporthistory_v2.relatedactionid = relatedactionid)
  • Rows Removed by Filter: 0
18. 31.432 74.584 ↓ 1.0 76,149 1

Hash (cost=5,227.15..5,227.15 rows=76,136 width=160) (actual time=74.584..74.584 rows=76,149 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 12638kB
19. 43.152 43.152 ↓ 1.0 76,149 1

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=76,136 width=160) (actual time=0.007..43.152 rows=76,149 loops=1)

  • Filter: ((start_action_date >= '2019-08-31 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: 69194
Planning time : 1.439 ms
Execution time : 6,216.837 ms