explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zsbh

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

QUERY PLAN |-------------------------------------------------------------------------------------------------------------------------------------------------------------|Limit (cost=3,750.94..3,750.95 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Group (cost=3,750.94..3,750.95 rows=1 width=8) (actual rows= loops=)

  • Group Key: i.dated, i.invoiceid
3. 0.000 0.000 ↓ 0.0

Sort (cost=3,750.94..3,750.95 rows=1 width=8) (actual rows= loops=)

  • Sort Key: i.dated DESC, i.invoiceid
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.98..3,750.93 rows=1 width=8) (actual rows= loops=)

  • Join Filter: ((si.itemid)::text = (i_1.itemid)::text)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.56..3,750.03 rows=2 width=26) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..3,589.56 rows=125 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using invoices_custid_index on invoices i (cost=0.56..31.07 rows=29 width=8) (actual rows= loops=)

  • Index Cond: (custid = 90,210)
8. 0.000 0.000 ↓ 0.0

Index Scan using lineitems_invoiceid_index on lineitems l (cost=0.57..121.53 rows=118 width=12) (actual rows= loops=)

  • Index Cond: (invoiceid = i.invoiceid)
9. 0.000 0.000 ↓ 0.0

Index Scan using inventoryspecs_itemid_index on inventoryspecs si (cost=0.43..1.27 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((itemid)::text = (l.itemid)::text)
  • Filter: ((specname)::text = 'Academic Version'::text)
10. 0.000 0.000 ↓ 0.0

Index Only Scan using "inventory_itemid_key_8311382e-0c98-48cb-af29-07be459c5145" on inventory i_1 (cost=0.42..0.44 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (itemid = (l.itemid)::text)