explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1qh4

Settings
# exclusive inclusive rows x rows loops node
1. 0.076 8,500.723 ↑ 1.0 24 1

Sort (cost=174,674.31..174,674.37 rows=24 width=227) (actual time=8,500.722..8,500.723 rows=24 loops=1)

  • Sort Key: cc.start_action_date
  • Sort Method: quicksort Memory: 33kB
2. 0.023 8,500.647 ↑ 1.0 24 1

Subquery Scan on cc (cost=174,672.27..174,673.76 rows=24 width=227) (actual time=8,500.489..8,500.647 rows=24 loops=1)

3. 0.001 8,500.624 ↑ 1.0 24 1

Limit (cost=174,672.27..174,673.52 rows=24 width=235) (actual time=8,500.487..8,500.624 rows=24 loops=1)

4. 0.022 8,500.623 ↑ 3,171.8 24 1

Unique (cost=174,672.27..178,630.87 rows=76,122 width=235) (actual time=8,500.486..8,500.623 rows=24 loops=1)

5. 7,469.823 8,500.601 ↑ 2,858.2 277 1

Sort (cost=174,672.27..176,651.57 rows=791,719 width=235) (actual time=8,500.485..8,500.601 rows=277 loops=1)

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

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

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

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

10. 43.561 230.997 ↑ 1.0 118,205 1

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

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

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

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

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

13. 14.860 37.110 ↓ 1.0 76,149 1

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

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

Seq Scan on salestransaction aa (cost=0.00..5,227.15 rows=76,122 width=160) (actual time=0.004..22.250 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 : 0.692 ms
Execution time : 8,549.450 ms