explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2NEB

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=937,030,965,627.63..937,030,965,629.15 rows=24 width=95) (actual rows= loops=)

  • Group Key: r.uidrelationship, r.abisender, (('0'::numeric > r.value))
2. 0.000 0.000 ↓ 0.0

Sort (cost=937,030,965,627.63..937,030,965,627.74 rows=44 width=49) (actual rows= loops=)

  • Sort Key: r.uidrelationship, r.abisender, (('0'::numeric > r.value))
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=786,526.42..937,030,965,626.43 rows=44 width=49) (actual rows= loops=)

  • Hash Cond: (r.uidreportupload = rep.uid)
4. 0.000 0.000 ↓ 0.0

Subquery Scan on r (cost=786,193.57..937,030,965,260.42 rows=8,695 width=64) (actual rows= loops=)

  • Filter: ((r.rn = 1) AND ((r.uidmatch IS NULL) OR ((r.uidmatch IS NOT NULL) AND ((SubPlan 1) > '2018-10-31'::date))))
5. 0.000 0.000 ↓ 0.0

WindowAgg (cost=786,193.57..844,794.99 rows=2,930,071 width=299) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=786,193.57..793,518.75 rows=2,930,071 width=88) (actual rows= loops=)

  • Sort Key: r_1.uid, r_1."timestamp" DESC
7. 0.000 0.000 ↓ 0.0

Seq Scan on spunta_record r_1 (cost=0.00..331,257.26 rows=2,930,071 width=88) (actual rows= loops=)

  • Filter: (("timestamp" < '2020-02-07 19:08:43.074'::timestamp without time zone) AND (dateaccounting <= '2018-10-31'::date))
8.          

SubPlan (for Subquery Scan)

9. 0.000 0.000 ↓ 0.0

Aggregate (cost=319,797.73..319,797.74 rows=1 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on spunta_record m (cost=0.00..319,797.71 rows=6 width=4) (actual rows= loops=)

  • Filter: (uidmatch = r.uidmatch)
11. 0.000 0.000 ↓ 0.0

Hash (cost=332.69..332.69 rows=13 width=16) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Subquery Scan on rep (cost=236.77..332.69 rows=13 width=16) (actual rows= loops=)

  • Filter: (rep.rn = 1)
13. 0.000 0.000 ↓ 0.0

WindowAgg (cost=236.77..300.72 rows=2,558 width=58) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Sort (cost=236.77..243.16 rows=2,558 width=50) (actual rows= loops=)

  • Sort Key: rep_1.uidrelationship, rep_1.datereference, rep_1.abisender, rep_1."timestamp" DESC
15. 0.000 0.000 ↓ 0.0

Seq Scan on spunta_report_upload rep_1 (cost=0.00..91.97 rows=2,558 width=50) (actual rows= loops=)

  • Filter: ("timestamp" < '2020-02-07 19:08:43.074'::timestamp without time zone)