explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tElq

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

Hash Left Join (cost=7.69..18.71 rows=2 width=3,216) (actual rows= loops=)

  • Hash Cond: ((leases.order_id)::text = ("iv_partitionedAttributes".scope_id)::text)
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=6.49..17.48 rows=2 width=3,216) (actual rows= loops=)

  • Hash Cond: ((le.lease_id)::text = (leases.lease_id)::text)
3. 0.000 0.000 ↓ 0.0

Seq Scan on lease_end le (cost=0.00..10.70 rows=70 width=516) (actual rows= loops=)

  • Filter: (id IS NOT NULL)
4. 0.000 0.000 ↓ 0.0

Hash (cost=6.47..6.47 rows=2 width=3,216) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Subquery Scan on leases (cost=6.38..6.47 rows=2 width=3,216) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Unique (cost=6.38..6.45 rows=2 width=3,216) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=6.38..6.39 rows=2 width=3,216) (actual rows= loops=)

  • Sort Key: llea.borrow_order_id, llea.transaction_id, llea.block_time, pmo.order_type, llea.lease_id, pmo."user", pmo.scope_id, llea.refund_time, llea.unstake_time, llea.quantity, lom.price, lom.lhs_fee
8. 0.000 0.000 ↓ 0.0

Append (cost=1.06..6.37 rows=2 width=3,216) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.06..3.18 rows=1 width=1,708) (actual rows= loops=)

  • Join Filter: ((llea.lend_order_id)::text = (pmo.order_id)::text)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..2.04 rows=1 width=2,700) (actual rows= loops=)

  • Join Filter: (((llea.lend_order_id)::text = (lom.lhs_order_id)::text) AND ((llea.borrow_order_id)::text = (lom.rhs_order_id)::text))
11. 0.000 0.000 ↓ 0.0

Seq Scan on lease llea (cost=0.00..1.01 rows=1 width=2,120) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on order_match lom (cost=0.00..1.01 rows=1 width=1,096) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Subquery Scan on pmo (cost=1.06..1.13 rows=1 width=42) (actual rows= loops=)

  • Filter: (pmo.row_number = 1)
14. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1.06..1.10 rows=2 width=1,359) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Sort (cost=1.06..1.06 rows=2 width=47) (actual rows= loops=)

  • Sort Key: "order".scope_id, "order".order_id, "order".id DESC
16. 0.000 0.000 ↓ 0.0

Seq Scan on "order" (cost=0.00..1.05 rows=2 width=47) (actual rows= loops=)

  • Filter: (quantity_fulfilled > '0'::numeric)
17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.06..3.18 rows=1 width=1,708) (actual rows= loops=)

  • Join Filter: ((rlea.borrow_order_id)::text = (rpmo.order_id)::text)
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..2.04 rows=1 width=2,184) (actual rows= loops=)

  • Join Filter: (((rlea.lend_order_id)::text = (rom.lhs_order_id)::text) AND ((rlea.borrow_order_id)::text = (rom.rhs_order_id)::text))
19. 0.000 0.000 ↓ 0.0

Seq Scan on lease rlea (cost=0.00..1.01 rows=1 width=2,120) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on order_match rom (cost=0.00..1.01 rows=1 width=1,096) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Subquery Scan on rpmo (cost=1.06..1.13 rows=1 width=42) (actual rows= loops=)

  • Filter: (rpmo.row_number = 1)
22. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1.06..1.10 rows=2 width=1,359) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Sort (cost=1.06..1.06 rows=2 width=47) (actual rows= loops=)

  • Sort Key: order_1.scope_id, order_1.order_id, order_1.id DESC
24. 0.000 0.000 ↓ 0.0

Seq Scan on "order" order_1 (cost=0.00..1.05 rows=2 width=47) (actual rows= loops=)

  • Filter: (quantity_fulfilled > '0'::numeric)
25. 0.000 0.000 ↓ 0.0

Hash (cost=1.19..1.19 rows=1 width=1,032) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Subquery Scan on iv_partitionedAttributes (cost=1.15..1.19 rows=1 width=1,032) (actual rows= loops=)

  • Filter: ("iv_partitionedAttributes".row_number = 1)
27. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1.15..1.17 rows=1 width=4,240) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Sort (cost=1.15..1.15 rows=1 width=2,096) (actual rows= loops=)

  • Sort Key: attribute.attribute_id, attribute.scope_id, attribute.id DESC
29. 0.000 0.000 ↓ 0.0

Seq Scan on attribute (cost=0.00..1.14 rows=1 width=2,096) (actual rows= loops=)

  • Filter: ((type)::text = 'borrower'::text)