explain.depesz.com

A tool for finding a real cause for slow queries.

Result: rsp

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.577 67.659 ↑ 1.2 171 1

HashAggregate (cost=706507063.84..706507065.84 rows=200 width=8) (actual time=67.614..67.659 rows=171 loops=1)

2. 1.391 67.082 ↑ 164153216.6 670 1

Nested Loop (cost=3339.51..431550426.07 rows=109982655108 width=8) (actual time=41.716..67.082 rows=670 loops=1)

  • Join Filter: (expert.o_incidents.id_reestr = oi.id_reestr)
3. 0.648 41.571 ↑ 38238.2 670 1

Nested Loop Left Join (cost=3339.51..195175.79 rows=25619574 width=8) (actual time=36.478..41.571 rows=670 loops=1)

  • Join Filter: (os.id_reestr = expert.o_incidents.id_reestr)
4. 0.249 36.477 ↑ 9.2 171 1

HashAggregate (cost=3339.51..3355.16 rows=1565 width=8) (actual time=36.392..36.477 rows=171 loops=1)

5. 0.061 36.228 ↑ 6.7 234 1

Append (cost=0.00..3335.60 rows=1565 width=8) (actual time=34.205..36.228 rows=234 loops=1)

6. 0.049 35.320 ↑ 5.9 171 1

Result (cost=0.00..2335.98 rows=1013 width=8) (actual time=34.205..35.320 rows=171 loops=1)

7. 0.039 35.271 ↑ 5.9 171 1

Append (cost=0.00..2335.98 rows=1013 width=8) (actual time=34.203..35.271 rows=171 loops=1)

8. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on o_incidents (cost=0.00..0.00 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((id_load = 1201) AND (lpu_id = 1001) AND (q_u = ANY ('{1,2,3,4,5,6}'::integer[])))
9. 35.230 35.230 ↑ 5.9 171 1

Index Scan using o_incidents_1201_idx_id_load_lpu_id on o_incidents_1201 o_incidents (cost=0.00..2335.98 rows=1012 width=8) (actual time=34.201..35.230 rows=171 loops=1)

  • Index Cond: ((id_load = 1201) AND (lpu_id = 1001))
  • Filter: (q_u = ANY ('{1,2,3,4,5,6}'::integer[]))
10. 0.029 0.847 ↑ 8.8 63 1

Result (cost=0.00..983.96 rows=552 width=8) (actual time=0.116..0.847 rows=63 loops=1)

11. 0.016 0.818 ↑ 8.8 63 1

Append (cost=0.00..983.96 rows=552 width=8) (actual time=0.115..0.818 rows=63 loops=1)

12. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on m_incidents (cost=0.00..0.00 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((id_load = 1201) AND (lpu_id = 1001) AND (type_usl = ANY ('{1,2,3,4,5,6}'::integer[])))
13. 0.801 0.801 ↑ 8.7 63 1

Index Scan using m_incidents_1201_idx_id_load_lpu_id on m_incidents_1201 m_incidents (cost=0.00..983.96 rows=551 width=8) (actual time=0.114..0.801 rows=63 loops=1)

  • Index Cond: ((id_load = 1201) AND (lpu_id = 1001))
  • Filter: (type_usl = ANY ('{1,2,3,4,5,6}'::integer[]))
14. 0.684 4.446 ↑ 10.5 4 171

Append (cost=0.00..122.03 rows=42 width=10) (actual time=0.010..0.026 rows=4 loops=171)

15. 0.171 0.171 ↓ 0.0 0 171

Index Scan using o_services_idx_id_reestr on o_services os (cost=0.00..0.27 rows=1 width=10) (actual time=0.001..0.001 rows=0 loops=171)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
16. 2.394 2.394 ↑ 3.8 4 171

Index Scan using o_services_1201_idx_id_reestr on o_services_1201 os (cost=0.00..48.89 rows=15 width=10) (actual time=0.008..0.014 rows=4 loops=171)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
17. 0.684 0.684 ↓ 0.0 0 171

Index Scan using o_services_1202_idx_id_reestr on o_services_1202 os (cost=0.00..71.99 rows=23 width=10) (actual time=0.004..0.004 rows=0 loops=171)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
18. 0.171 0.171 ↓ 0.0 0 171

Index Scan using o_services_1203_idx_id_reestr on o_services_1203 os (cost=0.00..0.30 rows=1 width=10) (actual time=0.001..0.001 rows=0 loops=171)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
19. 0.171 0.171 ↓ 0.0 0 171

Index Scan using o_services_1204_idx_id_reestr on o_services_1204 os (cost=0.00..0.30 rows=1 width=10) (actual time=0.001..0.001 rows=0 loops=171)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
20. 0.171 0.171 ↓ 0.0 0 171

Index Scan using o_services_1205_idx_id_reestr on o_services_1205 os (cost=0.00..0.30 rows=1 width=10) (actual time=0.001..0.001 rows=0 loops=171)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
21. 2.010 24.120 ↑ 6.0 1 670

Append (cost=0.00..16.76 rows=6 width=12) (actual time=0.016..0.036 rows=1 loops=670)

22. 2.680 2.680 ↓ 0.0 0 670

Index Scan using o_incidents_pkey on o_incidents oi (cost=0.00..0.27 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=670)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
  • Filter: (total > 123.4)
23. 8.040 8.040 ↑ 1.0 1 670

Index Scan using o_incidents_1201_pkey on o_incidents_1201 oi (cost=0.00..7.68 rows=1 width=12) (actual time=0.012..0.012 rows=1 loops=670)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
  • Filter: (total > 123.4)
24. 2.680 2.680 ↓ 0.0 0 670

Index Scan using o_incidents_1202_pkey on o_incidents_1202 oi (cost=0.00..7.91 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=670)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
  • Filter: (total > 123.4)
25. 4.020 4.020 ↓ 0.0 0 670

Index Scan using o_incidents_1203_pkey on o_incidents_1203 oi (cost=0.00..0.30 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=670)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
  • Filter: (total > 123.4)
26. 2.680 2.680 ↓ 0.0 0 670

Index Scan using o_incidents_1204_pkey on o_incidents_1204 oi (cost=0.00..0.30 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=670)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
  • Filter: (total > 123.4)
27. 2.010 2.010 ↓ 0.0 0 670

Index Scan using o_incidents_1205_pkey on o_incidents_1205 oi (cost=0.00..0.30 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=670)

  • Index Cond: (id_reestr = expert.o_incidents.id_reestr)
  • Filter: (total > 123.4)