explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3NsK

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

Limit (cost=182,747.67..182,747.73 rows=24 width=227) (actual time=9,390.240..9,390.243 rows=24 loops=1)

2. 25.286 9,390.241 ↑ 3,172.3 24 1

Sort (cost=182,747.67..182,938.01 rows=76,136 width=227) (actual time=9,390.240..9,390.241 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 33kB
3. 12.927 9,364.955 ↓ 1.0 76,149 1

Subquery Scan on cc (cost=175,900.90..180,621.59 rows=76,136 width=227) (actual time=8,828.705..9,364.955 rows=76,149 loops=1)

4. 59.813 9,352.028 ↓ 1.0 76,149 1

Unique (cost=175,900.90..179,860.23 rows=76,136 width=235) (actual time=8,828.703..9,352.028 rows=76,149 loops=1)

5. 8,257.612 9,292.215 ↓ 1.1 898,248 1

Sort (cost=175,900.90..177,880.57 rows=791,866 width=235) (actual time=8,828.702..9,292.215 rows=898,248 loops=1)

  • Sort Key: aa.id, bb.actiontime
  • Sort Method: external merge Disk: 247560kB
6. 544.602 1,034.603 ↓ 1.1 898,248 1

Hash Right Join (cost=16,878.73..98,318.24 rows=791,866 width=235) (actual time=275.742..1,034.603 rows=898,248 loops=1)

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

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

10. 43.599 226.852 ↑ 1.0 118,205 1

Hash (cost=15,393.80..15,393.80 rows=118,795 width=167) (actual time=226.852..226.852 rows=118,205 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 21428kB
11. 132.597 183.253 ↑ 1.0 118,205 1

Hash Right Join (cost=6,178.85..15,393.80 rows=118,795 width=167) (actual time=38.195..183.253 rows=118,205 loops=1)

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

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

13. 15.227 37.823 ↓ 1.0 76,149 1

Hash (cost=5,227.15..5,227.15 rows=76,136 width=160) (actual time=37.823..37.823 rows=76,149 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 12638kB
14. 22.596 22.596 ↓ 1.0 76,149 1

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=76,136 width=160) (actual time=0.004..22.596 rows=76,149 loops=1)

  • Filter: ((start_action_date >= '2019-08-31 21:00:00'::timestamp without time zone) AND (start_action_date <= '2019-11-30 20:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 69194
Planning time : 0.586 ms
Execution time : 9,439.797 ms