explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KUgr

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 26.842 27.419 ↑ 1.0 1 1

Nested Loop (cost=3.94..47.67 rows=1 width=4,247) (actual time=27.395..27.419 rows=1 loops=1)

2. 0.005 0.266 ↑ 1.0 1 1

Nested Loop (cost=3.52..10.36 rows=1 width=2,565) (actual time=0.245..0.266 rows=1 loops=1)

3. 0.010 0.214 ↑ 1.0 1 1

Nested Loop (cost=3.09..7.71 rows=1 width=2,446) (actual time=0.193..0.214 rows=1 loops=1)

  • Join Filter: (r.maketype_id = rm.id)
  • Rows Removed by Join Filter: 6
4. 0.008 0.194 ↑ 1.0 1 1

Nested Loop (cost=3.09..6.50 rows=1 width=2,268) (actual time=0.175..0.194 rows=1 loops=1)

5. 0.050 0.148 ↑ 1.0 1 1

Hash Join (cost=2.67..3.87 rows=1 width=2,206) (actual time=0.130..0.148 rows=1 loops=1)

  • Hash Cond: (rmd.id = r.madetype_id)
6. 0.025 0.025 ↑ 1.0 15 1

Seq Scan on reservations_madetypes rmd (cost=0.00..1.15 rows=15 width=182) (actual time=0.013..0.025 rows=15 loops=1)

7. 0.011 0.073 ↑ 1.0 1 1

Hash (cost=2.65..2.65 rows=1 width=2,028) (actual time=0.073..0.073 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.062 0.062 ↑ 1.0 1 1

Index Scan using reservations_pkey on reservations r (cost=0.43..2.65 rows=1 width=2,028) (actual time=0.060..0.062 rows=1 loops=1)

  • Index Cond: (id = 19,153,487)
9. 0.038 0.038 ↑ 1.0 1 1

Index Scan using locations_units_pkey on locations_units lu (cost=0.42..2.64 rows=1 width=62) (actual time=0.038..0.038 rows=1 loops=1)

  • Index Cond: (id = r.unit_id)
10. 0.010 0.010 ↑ 1.3 7 1

Seq Scan on reservations_maketypes rm (cost=0.00..1.09 rows=9 width=182) (actual time=0.006..0.010 rows=7 loops=1)

11. 0.047 0.047 ↑ 1.0 1 1

Index Scan using clients_pkey on clients c (cost=0.43..2.65 rows=1 width=123) (actual time=0.046..0.047 rows=1 loops=1)

  • Index Cond: (id = r.client_id)
12. 0.032 0.032 ↑ 1.0 1 1

Index Scan using locations_pkey on locations l (cost=0.42..2.64 rows=1 width=253) (actual time=0.031..0.032 rows=1 loops=1)

  • Index Cond: (id = r.location_id)
13.          

SubPlan (for Nested Loop)

14. 0.036 0.036 ↑ 1.0 1 1

Index Scan using reservations_types_pkey on reservations_types rt (cost=0.28..2.49 rows=1 width=11) (actual time=0.035..0.036 rows=1 loops=1)

  • Index Cond: (id = r.type_id)
15. 0.059 0.059 ↑ 1.0 1 1

Index Scan using condo_types_pkey on condo_types ct (cost=0.42..2.65 rows=1 width=32) (actual time=0.058..0.059 rows=1 loops=1)

  • Index Cond: (id = r.condo_type_id)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using condo_types_pkey on condo_types ct_1 (cost=0.42..2.64 rows=1 width=30) (never executed)

  • Index Cond: (id = r.condo_type_id)
17. 0.023 0.023 ↑ 1.0 1 1

Index Scan using countries_pkey on countries c_1 (cost=0.14..2.36 rows=1 width=12) (actual time=0.022..0.023 rows=1 loops=1)

  • Index Cond: (id = r.country_id)
18. 0.008 0.008 ↑ 1.0 1 1

Index Scan using countries_pkey on countries c_1_1 (cost=0.14..2.36 rows=1 width=146) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (id = r.country_id)
19. 0.020 0.020 ↑ 1.0 1 1

Seq Scan on reservations_status rs (cost=0.00..1.15 rows=1 width=146) (actual time=0.017..0.020 rows=1 loops=1)

  • Filter: (id = r.status_id)
  • Rows Removed by Filter: 11
20. 0.003 0.003 ↓ 0.0 0 1

Index Scan using states_pkey on states s (cost=0.28..2.50 rows=1 width=9) (actual time=0.002..0.003 rows=0 loops=1)

  • Index Cond: (id = r.state_id)
21. 0.002 0.002 ↓ 0.0 0 1

Index Scan using states_pkey on states s_1 (cost=0.28..2.50 rows=1 width=10) (actual time=0.001..0.002 rows=0 loops=1)

  • Index Cond: (id = r.state_id)
22. 0.072 0.072 ↑ 1.0 1 1

Index Only Scan using idx_locations_units_owning_complex1 on locations_units_owning luo (cost=0.42..1.54 rows=1 width=4) (actual time=0.070..0.072 rows=1 loops=1)

  • Index Cond: (location_unit_id = r.unit_id)
  • Heap Fetches: 1
23. 0.002 0.002 ↓ 0.0 0 1

Index Scan using companies_coupons_pkey on companies_coupons cc (cost=0.29..2.51 rows=1 width=20) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (id = r.coupon_id)
24. 0.002 0.002 ↓ 0.0 0 1

Index Scan using processors_pkey on processors p (cost=0.42..2.64 rows=1 width=1) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (id = r.lead_agent_id)
25. 0.011 0.011 ↑ 1.0 1 1

Index Scan using processors_pkey on processors p_1 (cost=0.42..2.64 rows=1 width=1) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (id = r.processor_id)
26. 0.029 0.029 ↑ 1.0 1 1

Index Scan using hear_about_pkey on hear_about ha (cost=0.29..2.51 rows=1 width=14) (actual time=0.028..0.029 rows=1 loops=1)

  • Index Cond: (id = r.hear_about_id)
27. 0.012 0.012 ↑ 1.0 1 1

Index Scan using condo_types_pkey on condo_types ct_2 (cost=0.42..2.64 rows=1 width=4) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: (id = r.condo_type_id)
Planning time : 12.174 ms
Execution time : 28.856 ms