explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uQO

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

Limit (cost=1,881.43..6,062.62 rows=10 width=105) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,881.43..7,402,596.14 rows=17,700 width=105) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,881.14..7,396,275.05 rows=17,700 width=74) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,880.86..7,390,365.21 rows=17,700 width=74) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,880.57..7,384,877.95 rows=17,700 width=58) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,880.15..7,376,922.67 rows=17,700 width=58) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1,879.74..7,368,708.16 rows=17,700 width=39) (actual rows= loops=)

  • Join Filter: (vends.machine_id = u0.id)
8. 0.000 0.000 ↓ 0.0

Index Scan Backward using vends_d7e6d55b on vends (cost=0.57..824,524.87 rows=18,161,169 width=35) (actual rows= loops=)

  • Index Cond: (("timestamp" >= '2019-05-27 22:00:00+00'::timestamp with time zone) AND ("timestamp" < '2019-06-25 22:00:00+00'::timestamp with time zone))
  • Filter: (alive AND (NOT in_test_mode))
9. 0.000 0.000 ↓ 0.0

Materialize (cost=1,879.17..6,162.51 rows=24 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,879.17..6,162.39 rows=24 width=4) (actual rows= loops=)

  • Hash Cond: (u0.location_id = u2.id)
  • Filter: ((upper((u0.caption)::text) ~~ '%1636%'::text) OR (upper((u2.caption)::text) ~~ '%1636%'::text))
11. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on machines u0 (cost=606.31..4,863.72 rows=1,535 width=27) (actual rows= loops=)

  • Recheck Cond: (owner_id = 16)
12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on machines_5e7b1936 (cost=0.00..605.93 rows=1,535 width=0) (actual rows= loops=)

  • Index Cond: (owner_id = 16)
13. 0.000 0.000 ↓ 0.0

Hash (cost=987.38..987.38 rows=22,838 width=39) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on machine_locations u2 (cost=0.00..987.38 rows=22,838 width=39) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using machines_pkey on machines (cost=0.41..0.45 rows=1 width=27) (actual rows= loops=)

  • Index Cond: (id = vends.machine_id)
16. 0.000 0.000 ↓ 0.0

Index Scan using machine_columns_pkey on machine_columns (cost=0.42..0.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (vends.column_id = id)
17. 0.000 0.000 ↓ 0.0

Index Scan using products_pkey on products (cost=0.28..0.30 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (vends.product_id = id)
18. 0.000 0.000 ↓ 0.0

Index Scan using tax_rates_pkey on tax_rates (cost=0.28..0.32 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (products.tax_rate_id = id)
19. 0.000 0.000 ↓ 0.0

Index Scan using machine_locations_pkey on machine_locations (cost=0.29..0.35 rows=1 width=39) (actual rows= loops=)

  • Index Cond: (machines.location_id = id)