explain.depesz.com

PostgreSQL's explain analyze made readable

Result: emOn

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

Limit (cost=76,300.26..76,300.32 rows=24 width=227) (actual time=1,834.942..1,834.944 rows=24 loops=1)

2. 7.078 1,834.942 ↑ 1,497.3 24 1

Sort (cost=76,300.26..76,390.09 rows=35,935 width=227) (actual time=1,834.941..1,834.942 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 3.831 1,827.864 ↑ 1.6 22,706 1

Subquery Scan on cc (cost=74,218.73..75,296.78 rows=35,935 width=227) (actual time=1,803.231..1,827.864 rows=22,706 loops=1)

4. 7.822 1,824.033 ↑ 1.6 22,706 1

Unique (cost=74,218.73..74,937.43 rows=35,935 width=235) (actual time=1,803.230..1,824.033 rows=22,706 loops=1)

5. 10.003 1,816.211 ↑ 1.5 23,253 1

Group (cost=74,218.73..74,847.59 rows=35,935 width=235) (actual time=1,803.229..1,816.211 rows=23,253 loops=1)

  • Group Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
6. 132.633 1,806.208 ↑ 1.0 34,563 1

Sort (cost=74,218.73..74,308.57 rows=35,935 width=235) (actual time=1,803.226..1,806.208 rows=34,563 loops=1)

  • Sort Key: aa.id, aa_1.actiontime, aa_1.requestedpath, salestransactionpayment.type, aa_1.action, aa_1.comment
  • Sort Method: quicksort Memory: 14451kB
7. 45.055 1,673.575 ↑ 1.0 34,563 1

Hash Right Join (cost=63,963.76..71,499.69 rows=35,935 width=235) (actual time=1,654.683..1,673.575 rows=34,563 loops=1)

  • Hash Cond: (salestransactionpayment.salestransaction_id = aa.id)
8. 12.424 12.424 ↑ 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.424 rows=226,779 loops=1)

9. 14.247 1,616.096 ↑ 1.0 22,706 1

Hash (cost=63,675.87..63,675.87 rows=23,031 width=228) (actual time=1,616.096..1,616.096 rows=22,706 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 6167kB
10. 72.264 1,601.849 ↑ 1.0 22,706 1

Hash Right Join (cost=61,950.25..63,675.87 rows=23,031 width=228) (actual time=484.209..1,601.849 rows=22,706 loops=1)

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

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

12. 292.704 527.347 ↓ 723.7 144,734 1

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

  • Group Key: videoexporthistory_v2.relatedactionid
13. 32.304 234.643 ↑ 1.0 967,975 1

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

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

15. 202.338 202.338 ↑ 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.004..202.338 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. 4.594 9.071 ↑ 1.0 22,706 1

Hash (cost=3,884.95..3,884.95 rows=23,031 width=160) (actual time=9.071..9.071 rows=22,706 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 3774kB
20. 3.207 4.477 ↑ 1.0 22,706 1

Bitmap Heap Scan on salestransaction aa (cost=492.49..3,884.95 rows=23,031 width=160) (actual time=1.415..4.477 rows=22,706 loops=1)

  • Recheck Cond: ((start_action_date >= '2019-10-30 21:00:00'::timestamp without time zone) AND (start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
  • Heap Blocks: exact=1577
21. 1.270 1.270 ↑ 1.0 22,706 1

Bitmap Index Scan on salestransaction_startactiondate_ix (cost=0.00..486.73 rows=23,031 width=0) (actual time=1.270..1.270 rows=22,706 loops=1)

  • Index Cond: ((start_action_date >= '2019-10-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.900 ms
Execution time : 1,840.003 ms