explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9cEq

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

Limit (cost=442,292.95..442,293.01 rows=24 width=227) (actual time=15,324.628..15,324.631 rows=24 loops=1)

2. 8.152 15,324.629 ↑ 30.3 24 1

Sort (cost=442,292.95..442,294.77 rows=727 width=227) (actual time=15,324.627..15,324.629 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 17.048 15,316.477 ↓ 30.0 21,821 1

Subquery Scan on cc (cost=432,534.19..442,272.65 rows=727 width=227) (actual time=14,053.980..15,316.477 rows=21,821 loops=1)

  • Filter: ((cc.start_action_date >= '2019-10-31 21:00:00'::timestamp without time zone) AND (cc.start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 123522
4. 104.291 15,299.429 ↑ 1.0 145,343 1

Unique (cost=432,534.19..440,092.51 rows=145,343 width=235) (actual time=14,053.925..15,299.429 rows=145,343 loops=1)

5. 13,767.440 15,195.138 ↓ 1.0 1,513,804 1

Sort (cost=432,534.19..436,313.35 rows=1,511,664 width=235) (actual time=14,053.924..15,195.138 rows=1,513,804 loops=1)

  • Sort Key: aa.id, bb.actiontime
  • Sort Method: external merge Disk: 412400kB
6. 809.783 1,427.698 ↓ 1.0 1,513,804 1

Hash Right Join (cost=19,446.75..106,873.22 rows=1,511,664 width=235) (actual time=338.709..1,427.698 rows=1,513,804 loops=1)

  • Hash Cond: (bb.relatedactionid = aa.id)
7. 45.900 281.617 ↑ 1.0 967,975 1

Append (cost=0.00..52,933.27 rows=968,828 width=109) (actual time=0.004..281.617 rows=967,975 loops=1)

8. 0.000 0.000 ↓ 0.0 0 1

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

9. 235.717 235.717 ↑ 1.0 967,975 1

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

10. 87.576 336.298 ↑ 1.0 226,776 1

Hash (cost=16,612.01..16,612.01 rows=226,779 width=167) (actual time=336.298..336.298 rows=226,776 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 41102kB
11. 190.402 248.722 ↑ 1.0 226,776 1

Hash Right Join (cost=6,317.22..16,612.01 rows=226,779 width=167) (actual time=43.768..248.722 rows=226,776 loops=1)

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

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

13. 30.609 43.687 ↑ 1.0 145,343 1

Hash (cost=4,500.43..4,500.43 rows=145,343 width=160) (actual time=43.687..43.687 rows=145,343 loops=1)

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

Seq Scan on salestransaction aa (cost=0.00..4,500.43 rows=145,343 width=160) (actual time=0.003..13.078 rows=145,343 loops=1)

Planning time : 0.545 ms
Execution time : 15,400.404 ms