explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vvUL

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

Limit (cost=76.63..92.72 rows=1 width=30) (actual rows= loops=)

  • Output: main_host.id, main_host.name
2. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=76.63..92.72 rows=1 width=30) (actual rows= loops=)

  • Output: main_host.id, main_host.name
  • Join Filter: (main_host.id = "ANY_subquery".col1)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..16.48 rows=1 width=30) (actual rows= loops=)

  • Output: main_host.id, main_host.name
4. 0.000 0.000 ↓ 0.0

Index Scan using main_host_name_inventory_id_45aecd68_uniq on public.main_host (cost=0.28..8.31 rows=1 width=34) (actual rows= loops=)

  • Output: main_host.id, main_host.name, main_host.inventory_id
  • Index Cond: ((main_host.name)::text = 'lsrv4341.linux.rabobank.nl'::text)
  • Filter: ((main_host.ansible_facts @> '{"ansible_local": {"node": {"build": "itn"}}}'::jsonb) AND (main_host.ansible_facts @> '{"ansible_local": {"node": {"department": "inf_iseu_ps_linux"}}}'::jsonb) AND (main_host.ansible_facts @> '{"ansible_local": {"node": {"zone": "ota"}}}'::jsonb))
5. 0.000 0.000 ↓ 0.0

Index Scan using main_inventory_pkey on public.main_inventory (cost=0.14..8.16 rows=1 width=4) (actual rows= loops=)

  • Output: main_inventory.id
  • Index Cond: (main_inventory.id = main_host.inventory_id)
  • Filter: (main_inventory.organization_id = 2)
6. 0.000 0.000 ↓ 0.0

Materialize (cost=76.20..76.22 rows=1 width=4) (actual rows= loops=)

  • Output: "ANY_subquery".col1
7. 0.000 0.000 ↓ 0.0

Subquery Scan on ANY_subquery (cost=76.20..76.22 rows=1 width=4) (actual rows= loops=)

  • Output: "ANY_subquery".col1
8. 0.000 0.000 ↓ 0.0

Unique (cost=76.20..76.21 rows=1 width=30) (actual rows= loops=)

  • Output: u0.id, u0.name
9. 0.000 0.000 ↓ 0.0

Sort (cost=76.20..76.21 rows=1 width=30) (actual rows= loops=)

  • Output: u0.id, u0.name
  • Sort Key: u0.name, u0.id
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=64.14..76.19 rows=1 width=30) (actual rows= loops=)

  • Output: u0.id, u0.name
11. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on public.main_host u0 (cost=64.00..68.02 rows=1 width=34) (actual rows= loops=)

  • Output: u0.id, u0.name, u0.inventory_id
  • Recheck Cond: ((u0.ansible_facts @> '{"ansible_local": {"node": {"build": "itn"}}}'::jsonb) AND (u0.ansible_facts @> '{"ansible_local": {"node": {"department": "inf_iseu_ps_linux"}}}'::jsonb) AND (u0.ansible_facts @> '{"ansible_local": {"node": {"zone": "ota"}}}'::jsonb))
12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on host_ansible_facts_default_gin (cost=0.00..64.00 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((u0.ansible_facts @> '{"ansible_local": {"node": {"build": "itn"}}}'::jsonb) AND (u0.ansible_facts @> '{"ansible_local": {"node": {"department": "inf_iseu_ps_linux"}}}'::jsonb) AND (u0.ansible_facts @> '{"ansible_local": {"node": {"zone": "ota"}}}'::jsonb))
13. 0.000 0.000 ↓ 0.0

Index Scan using main_inventory_pkey on public.main_inventory u1 (cost=0.14..8.16 rows=1 width=4) (actual rows= loops=)

  • Output: u1.id
  • Index Cond: (u1.id = u0.inventory_id)
  • Filter: (u1.organization_id = 2)