explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JnNd

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

Limit (cost=442,292.95..442,293.01 rows=24 width=227) (actual time=19,066.687..19,066.690 rows=24 loops=1)

2. 33.860 19,066.688 ↑ 30.3 24 1

Sort (cost=442,292.95..442,294.77 rows=727 width=227) (actual time=19,066.686..19,066.688 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 31.653 19,032.828 ↓ 104.7 76,149 1

Subquery Scan on cc (cost=432,534.19..442,272.65 rows=727 width=227) (actual time=17,338.279..19,032.828 rows=76,149 loops=1)

  • Filter: ((cc.start_action_date >= '2019-08-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: 69194
4. 125.146 19,001.175 ↑ 1.0 145,343 1

Unique (cost=432,534.19..440,092.51 rows=145,343 width=235) (actual time=17,338.273..19,001.175 rows=145,343 loops=1)

5. 17,153.750 18,876.029 ↓ 1.0 1,513,804 1

Sort (cost=432,534.19..436,313.35 rows=1,511,664 width=235) (actual time=17,338.272..18,876.029 rows=1,513,804 loops=1)

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

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

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

Append (cost=0.00..52,933.27 rows=968,828 width=109) (actual time=0.004..369.153 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. 325.392 325.392 ↑ 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..325.392 rows=967,975 loops=1)

10. 84.565 326.681 ↑ 1.0 226,776 1

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

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

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

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

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

13. 33.651 46.502 ↑ 1.0 145,343 1

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

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

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

Planning time : 1.047 ms
Execution time : 19,142.291 ms