explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1drT

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 23,539.779 ↑ 1.0 24 1

Limit (cost=206,677.37..206,677.43 rows=24 width=227) (actual time=23,539.775..23,539.779 rows=24 loops=1)

2. 701.985 23,539.775 ↑ 32,988.3 24 1

Sort (cost=206,677.37..208,656.66 rows=791,719 width=227) (actual time=23,539.773..23,539.775 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: top-N heapsort Memory: 31kB
3. 410.368 22,837.790 ↓ 1.1 898,248 1

Subquery Scan on cc (cost=174,672.27..184,568.76 rows=791,719 width=227) (actual time=21,334.528..22,837.790 rows=898,248 loops=1)

4. 20,092.777 22,427.422 ↓ 1.1 898,248 1

Sort (cost=174,672.27..176,651.57 rows=791,719 width=235) (actual time=21,334.525..22,427.422 rows=898,248 loops=1)

  • Sort Key: aa.id, videoexporthistory_v2.actiontime
  • Sort Method: external merge Disk: 247560kB
5. 1,240.562 2,334.645 ↓ 1.1 898,248 1

Hash Right Join (cost=16,878.06..97,105.07 rows=791,719 width=235) (actual time=634.342..2,334.645 rows=898,248 loops=1)

  • Hash Cond: (videoexporthistory_v2.relatedactionid = aa.id)
6. 93.072 579.743 ↑ 1.0 967,975 1

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

7. 0.001 0.001 ↓ 0.0 0 1

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

8. 486.670 486.670 ↑ 1.0 967,975 1

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

9. 118.940 514.340 ↑ 1.0 118,205 1

Hash (cost=15,393.40..15,393.40 rows=118,773 width=167) (actual time=514.340..514.340 rows=118,205 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 21428kB
10. 290.512 395.400 ↑ 1.0 118,205 1

Hash Right Join (cost=6,178.67..15,393.40 rows=118,773 width=167) (actual time=73.078..395.400 rows=118,205 loops=1)

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

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

12. 30.495 72.358 ↓ 1.0 76,149 1

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

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

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=76,122 width=160) (actual time=0.011..41.863 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-29 20:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 69194
Planning time : 1.101 ms
Execution time : 23,640.467 ms