explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M3bi

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 15,038.650 ↑ 1.0 24 1

Limit (cost=446,331.33..446,331.39 rows=24 width=227) (actual time=15,038.648..15,038.650 rows=24 loops=1)

2. 49.998 15,038.649 ↑ 6,056.0 24 1

Sort (cost=446,331.33..446,694.69 rows=145,343 width=227) (actual time=15,038.647..15,038.649 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 25.443 14,988.651 ↑ 1.0 145,343 1

Subquery Scan on cc (cost=433,260.90..442,272.65 rows=145,343 width=227) (actual time=13,713.515..14,988.651 rows=145,343 loops=1)

4. 105.029 14,963.208 ↑ 1.0 145,343 1

Unique (cost=433,260.90..440,819.22 rows=145,343 width=235) (actual time=13,713.513..14,963.208 rows=145,343 loops=1)

5. 13,435.909 14,858.179 ↓ 1.0 1,513,804 1

Sort (cost=433,260.90..437,040.06 rows=1,511,664 width=235) (actual time=13,713.512..14,858.179 rows=1,513,804 loops=1)

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

Hash Right Join (cost=20,173.46..107,599.93 rows=1,511,664 width=235) (actual time=349.596..1,422.270 rows=1,513,804 loops=1)

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

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

10. 86.732 347.104 ↑ 1.0 226,776 1

Hash (cost=17,338.72..17,338.72 rows=226,779 width=167) (actual time=347.104..347.104 rows=226,776 loops=1)

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

Hash Right Join (cost=7,043.93..17,338.72 rows=226,779 width=167) (actual time=55.333..260.372 rows=226,776 loops=1)

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

13. 28.650 55.275 ↑ 1.0 145,343 1

Hash (cost=5,227.15..5,227.15 rows=145,343 width=160) (actual time=55.275..55.275 rows=145,343 loops=1)

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

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=145,343 width=160) (actual time=0.012..26.625 rows=145,343 loops=1)

  • Filter: ((start_action_date >= '2019-01-31 21:00:00'::timestamp without time zone) AND (start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
Planning time : 0.612 ms
Execution time : 15,107.307 ms