explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7YOQ

Settings
# exclusive inclusive rows x rows loops node
1. 2.479 69.775 ↓ 91.4 1,554 1

Sort (cost=4,996.40..4,996.44 rows=17 width=280) (actual time=69.476..69.775 rows=1,554 loops=1)

  • Sort Key: t.id
  • Sort Method: quicksort Memory: 382kB
2. 1.789 67.296 ↓ 91.4 1,554 1

Hash Left Join (cost=4,425.24..4,996.05 rows=17 width=280) (actual time=42.673..67.296 rows=1,554 loops=1)

  • Hash Cond: (t18.id_order = p.itemid)
3. 1.599 30.778 ↓ 310.8 1,554 1

Nested Loop Left Join (cost=95.90..663.47 rows=5 width=176) (actual time=7.890..30.778 rows=1,554 loops=1)

4. 0.574 24.517 ↓ 310.8 1,554 1

Nested Loop Left Join (cost=95.62..661.37 rows=5 width=176) (actual time=7.881..24.517 rows=1,554 loops=1)

5. 1.608 17.727 ↓ 310.8 1,554 1

Hash Join (cost=95.33..659.29 rows=5 width=176) (actual time=7.869..17.727 rows=1,554 loops=1)

  • Hash Cond: (t.id_order_vehicle = t8.id)
6. 6.838 8.382 ↑ 1.0 5,698 1

Hash Left Join (cost=1.56..544.10 rows=5,698 width=128) (actual time=0.055..8.382 rows=5,698 loops=1)

  • Hash Cond: (t.editor = (t1.login)::text)
7. 1.510 1.510 ↑ 1.0 5,698 1

Seq Scan on ord_order_vehicle_calc_supp t (cost=0.00..496.98 rows=5,698 width=325) (actual time=0.012..1.510 rows=5,698 loops=1)

8. 0.018 0.034 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=32) (actual time=0.034..0.034 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.016 0.016 ↑ 1.0 25 1

Seq Scan on profile t1 (cost=0.00..1.25 rows=25 width=32) (actual time=0.009..0.016 rows=25 loops=1)

10. 0.663 7.737 ↓ 519.0 1,557 1

Hash (cost=93.73..93.73 rows=3 width=64) (actual time=7.737..7.737 rows=1,557 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 162kB
11. 0.441 7.074 ↓ 519.0 1,557 1

Nested Loop (cost=4.78..93.73 rows=3 width=64) (actual time=3.846..7.074 rows=1,557 loops=1)

12. 0.079 5.580 ↓ 81.0 81 1

Nested Loop Left Join (cost=4.50..93.02 rows=1 width=48) (actual time=3.837..5.580 rows=81 loops=1)

13. 0.041 5.339 ↓ 81.0 81 1

Nested Loop (cost=4.36..92.85 rows=1 width=48) (actual time=3.829..5.339 rows=81 loops=1)

14. 5.211 5.211 ↑ 1.0 1 1

Seq Scan on crm_agent t10 (cost=0.00..61.17 rows=1 width=16) (actual time=3.781..5.211 rows=1 loops=1)

  • Filter: (name ~~* '%модуль%'::text)
  • Rows Removed by Filter: 1213
15. 0.060 0.087 ↓ 8.1 81 1

Bitmap Heap Scan on ord_order t9 (cost=4.36..31.57 rows=10 width=80) (actual time=0.037..0.087 rows=81 loops=1)

  • Recheck Cond: (id_agent = t10.id)
  • Heap Blocks: exact=20
16. 0.027 0.027 ↓ 8.1 81 1

Bitmap Index Scan on ix_ord_order_id_agent (cost=0.00..4.35 rows=10 width=0) (actual time=0.027..0.027 rows=81 loops=1)

  • Index Cond: (id_agent = t10.id)
17. 0.162 0.162 ↑ 1.0 1 81

Index Scan using pk_com_employee on com_employee t13 (cost=0.14..0.17 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=81)

  • Index Cond: (id = t9.id_responsible)
18. 1.053 1.053 ↓ 6.3 19 81

Index Scan using ix_ord_order_vehicle_id_order on ord_order_vehicle t8 (cost=0.28..0.68 rows=3 width=48) (actual time=0.004..0.013 rows=19 loops=81)

  • Index Cond: (id_order = t9.id)
19. 6.216 6.216 ↑ 1.0 1 1,554

Index Scan using pk_ord_order_vehicle_oper on ord_order_vehicle_oper t16 (cost=0.28..0.41 rows=1 width=48) (actual time=0.003..0.004 rows=1 loops=1,554)

  • Index Cond: (id = t.id_order_vehicle_oper)
20. 4.662 4.662 ↑ 1.0 1 1,554

Index Scan using pk_ord_order_vehicle on ord_order_vehicle t18 (cost=0.28..0.41 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=1,554)

  • Index Cond: (id = t16.id_order_vehicle)
21. 0.586 34.729 ↑ 2.5 1,881 1

Hash (cost=4,271.57..4,271.57 rows=4,622 width=24) (actual time=34.729..34.729 rows=1,881 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 167kB
22. 0.312 34.143 ↑ 2.5 1,881 1

Subquery Scan on p (cost=4,179.13..4,271.57 rows=4,622 width=24) (actual time=33.292..34.143 rows=1,881 loops=1)

23. 2.567 33.831 ↑ 2.5 1,881 1

HashAggregate (cost=4,179.13..4,225.35 rows=4,622 width=24) (actual time=33.291..33.831 rows=1,881 loops=1)

  • Group Key: p_1.itemid
24. 1.178 31.264 ↑ 8.0 2,886 1

Merge Join (cost=3,417.24..3,889.94 rows=23,135 width=32) (actual time=29.556..31.264 rows=2,886 loops=1)

  • Merge Cond: ((lower((s.id)::text)) = (lower((p_1.accountid)::text)))
25. 1.698 4.853 ↑ 5.2 191 1

Sort (cost=60.08..62.58 rows=1,000 width=40) (actual time=4.817..4.853 rows=191 loops=1)

  • Sort Key: (lower((s.id)::text))
  • Sort Method: quicksort Memory: 64kB
26. 3.155 3.155 ↑ 5.2 191 1

Function Scan on sessionaccount s (cost=0.25..10.25 rows=1,000 width=40) (actual time=2.263..3.155 rows=191 loops=1)

27. 7.992 25.233 ↑ 1.6 2,889 1

Sort (cost=3,357.16..3,368.73 rows=4,627 width=46) (actual time=24.731..25.233 rows=2,889 loops=1)

  • Sort Key: (lower((p_1.accountid)::text))
  • Sort Method: quicksort Memory: 838kB
28. 16.219 17.241 ↑ 1.0 4,588 1

Bitmap Heap Scan on itempermission p_1 (cost=252.28..3,075.47 rows=4,627 width=46) (actual time=1.345..17.241 rows=4,588 loops=1)

  • Recheck Cond: (entityname = 'trlog.ord_order'::text)
  • Heap Blocks: exact=1405
29. 1.022 1.022 ↑ 1.0 4,588 1

Bitmap Index Scan on pk_itempermission (cost=0.00..251.12 rows=4,627 width=0) (actual time=1.022..1.022 rows=4,588 loops=1)

  • Index Cond: (entityname = 'trlog.ord_order'::text)