explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3KR3

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.453 ↓ 0.0 0 1

GroupAggregate (cost=66.58..66.62 rows=1 width=95) (actual time=0.453..0.453 rows=0 loops=1)

  • Output: r.uidrelationship, r.abisender, (('0'::numeric > r.value)), count(r.uid), sum(r.value), sum(((GREATEST(('2018-10-31'::date - r.datevalue), 0))::numeric * r.value))
  • Group Key: r.uidrelationship, r.abisender, (('0'::numeric > r.value))
  • Buffers: shared hit=40
2. 0.069 0.452 ↓ 0.0 0 1

Sort (cost=66.58..66.58 rows=1 width=48) (actual time=0.452..0.452 rows=0 loops=1)

  • Output: r.uidrelationship, r.abisender, (('0'::numeric > r.value)), r.uid, r.value, r.datevalue
  • Sort Key: r.uidrelationship, r.abisender, (('0'::numeric > r.value))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=40
3. 0.000 0.383 ↓ 0.0 0 1

Nested Loop (cost=59.24..66.57 rows=1 width=48) (actual time=0.383..0.383 rows=0 loops=1)

  • Output: r.uidrelationship, r.abisender, ('0'::numeric > r.value), r.uid, r.value, r.datevalue
  • Join Filter: (r.uidreportupload = rep.uid)
  • Buffers: shared hit=29
4. 0.001 0.383 ↓ 0.0 0 1

Subquery Scan on r (cost=38.07..38.11 rows=1 width=63) (actual time=0.383..0.383 rows=0 loops=1)

  • Output: r.uidreportupload, r.uid, r.transaction_id, r.output_index, r.uidrelationship, r.abisender, r.datevalue, r.dateaccounting, r.value, r.uidmatch, r.matchtype, r.rn, r_1."timestamp
  • Filter: ((r.uidmatch IS NULL) AND (r.rn = 1))
  • Buffers: shared hit=29
5. 0.002 0.382 ↓ 0.0 0 1

WindowAgg (cost=38.07..38.09 rows=1 width=298) (actual time=0.382..0.382 rows=0 loops=1)

  • Output: r_1.uidreportupload, r_1.uid, NULL::character varying(64), NULL::integer, r_1.uidrelationship, r_1.abisender, r_1.datevalue, NULL::date, r_1.value, r_1.uidmatch, NULL::character varying(255), row_number() OVER (?), r_1."timestamp
  • Buffers: shared hit=29
6. 0.020 0.380 ↓ 0.0 0 1

Sort (cost=38.07..38.08 rows=1 width=87) (actual time=0.380..0.380 rows=0 loops=1)

  • Output: r_1.uid, r_1."timestamp", r_1.uidreportupload, r_1.uidrelationship, r_1.abisender, r_1.datevalue, r_1.value, r_1.uidmatch
  • Sort Key: r_1.uid, r_1."timestamp" DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=29
7. 0.360 0.360 ↓ 0.0 0 1

Seq Scan on corda.spunta_record r_1 (cost=0.00..38.06 rows=1 width=87) (actual time=0.360..0.360 rows=0 loops=1)

  • Output: r_1.uid, r_1."timestamp", r_1.uidreportupload, r_1.uidrelationship, r_1.abisender, r_1.datevalue, r_1.value, r_1.uidmatch
  • Filter: ((r_1."timestamp" < '2020-02-07 19:08:43.074'::timestamp without time zone) AND (r_1.dateaccounting <= '2018-10-31'::date))
  • Rows Removed by Filter: 804
  • Buffers: shared hit=26
8. 0.000 0.000 ↓ 0.0 0

Subquery Scan on rep (cost=21.17..28.45 rows=1 width=16) (never executed)

  • Output: rep.uid, rep.uidrelationship, rep.abisender, rep.datereference, rep.rn, rep_1."timestamp
  • Filter: (rep.rn = 1)
9. 0.000 0.000 ↓ 0.0 0

WindowAgg (cost=21.17..26.02 rows=194 width=58) (never executed)

  • Output: rep_1.uid, rep_1.uidrelationship, rep_1.abisender, rep_1.datereference, row_number() OVER (?), rep_1."timestamp
10. 0.000 0.000 ↓ 0.0 0

Sort (cost=21.17..21.66 rows=194 width=50) (never executed)

  • Output: rep_1.uidrelationship, rep_1.abisender, rep_1.datereference, rep_1."timestamp", rep_1.uid
  • Sort Key: rep_1.uidrelationship, rep_1.datereference, rep_1.abisender, rep_1."timestamp" DESC
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on corda.spunta_report_upload rep_1 (cost=0.00..13.80 rows=194 width=50) (never executed)

  • Output: rep_1.uidrelationship, rep_1.abisender, rep_1.datereference, rep_1."timestamp", rep_1.uid
  • Filter: (rep_1."timestamp" < '2020-02-07 19:08:43.074'::timestamp without time zone)
Planning time : 0.402 ms
Execution time : 0.585 ms