explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Upim

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

GroupAggregate (cost=97,716.49..97,751.84 rows=3 width=12) (actual rows= loops=)

  • Group Key: s.request_id
2. 0.000 0.000 ↓ 0.0

Sort (cost=97,716.49..97,728.26 rows=4,710 width=8) (actual rows= loops=)

  • Sort Key: s.request_id
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,564.18..97,429.14 rows=4,710 width=8) (actual rows= loops=)

  • Hash Cond: (p.contragents_registry_id = s.contragents_registry_id)
4. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..43,900.61 rows=3,775,800 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on bs_positions p (cost=0.00..19,357.91 rows=377,580 width=136) (actual rows= loops=)

  • Filter: (removed_date IS NULL)
6. 0.000 0.000 ↓ 0.0

Hash (cost=1,564.15..1,564.15 rows=3 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Subquery Scan on s (cost=1,540.84..1,564.15 rows=3 width=8) (actual rows= loops=)

  • Filter: (s.row_number = 1)
8. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1,540.84..1,555.82 rows=666 width=52) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Sort (cost=1,540.84..1,542.50 rows=666 width=20) (actual rows= loops=)

  • Sort Key: r.id, s_1.specification, s_1.bank_date DESC
10. 0.000 0.000 ↓ 0.0

Merge Join (cost=1,440.78..1,509.60 rows=666 width=20) (actual rows= loops=)

  • Merge Cond: ((r.customer_id = s_1.customer_id) AND (r.lot_id = s_1.lot_id))
11. 0.000 0.000 ↓ 0.0

Sort (cost=750.83..762.33 rows=4,597 width=12) (actual rows= loops=)

  • Sort Key: r.customer_id, r.lot_id
12. 0.000 0.000 ↓ 0.0

Seq Scan on bs_requests r (cost=0.00..471.19 rows=4,597 width=12) (actual rows= loops=)

  • Filter: ((specification IS NULL) AND bank_approved AND (version = 0))
13. 0.000 0.000 ↓ 0.0

Sort (cost=689.94..699.17 rows=3,692 width=24) (actual rows= loops=)

  • Sort Key: s_1.customer_id, s_1.lot_id
  • -> Seq Scan on bs_requests s_1 (cost=0.00..471.19 rows=3692 width=24)" Filter: (bank_approved AND (bank_date < '2020-01-01 00:00:00+03'::timestamp with time zone))