explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8guN

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

Limit (cost=442,292.95..442,293.01 rows=24 width=227) (actual time=16,075.917..16,075.920 rows=24 loops=1)

2. 49.756 16,075.918 ↑ 30.3 24 1

Sort (cost=442,292.95..442,294.77 rows=727 width=227) (actual time=16,075.916..16,075.918 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 30.373 16,026.162 ↓ 199.9 145,343 1

Subquery Scan on cc (cost=432,534.19..442,272.65 rows=727 width=227) (actual time=14,767.934..16,026.162 rows=145,343 loops=1)

  • Filter: ((cc.start_action_date >= '2019-01-31 21:00:00'::timestamp without time zone) AND (cc.start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
4. 101.565 15,995.789 ↑ 1.0 145,343 1

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

5. 14,391.774 15,894.224 ↓ 1.0 1,513,804 1

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

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

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

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

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

10. 90.923 341.363 ↑ 1.0 226,776 1

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

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

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

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

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

13. 27.881 39.601 ↑ 1.0 145,343 1

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

  • Buckets: 16384 Batches: 1 Memory Usage: 24121kB
14. 11.720 11.720 ↑ 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..11.720 rows=145,343 loops=1)

Planning time : 0.549 ms
Execution time : 16,144.274 ms