explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6X4C : 1

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 780,920.090 ↓ 0.0 0 1

Limit (cost=3.27..2,686,825.75 rows=1 width=1,417) (actual time=780,920.089..780,920.090 rows=0 loops=1)

2. 0.086 780,920.088 ↓ 0.0 0 1

Nested Loop (cost=3.27..2,686,825.75 rows=1 width=1,417) (actual time=780,920.088..780,920.088 rows=0 loops=1)

  • Join Filter: (w.id_base = b.id)
  • Rows Removed by Join Filter: 64
3. 1.728 1.728 ↑ 1.0 2 1

Seq Scan on t_bases b (cost=0.00..123.46 rows=2 width=37) (actual time=0.739..1.728 rows=2 loops=1)

  • Filter: ((c_name)::text = ANY ('{"КЦ Петропавловск","КЦД Казахстан"}'::text[]))
  • Rows Removed by Filter: 6168
4. 0.297 780,918.274 ↓ 32.0 32 2

Materialize (cost=3.27..2,686,700.78 rows=1 width=1,360) (actual time=16,227.544..390,459.137 rows=32 loops=2)

5. 197.902 780,917.977 ↓ 32.0 32 1

Nested Loop (cost=3.27..2,686,700.77 rows=1 width=1,360) (actual time=32,455.077..780,917.977 rows=32 loops=1)

  • Join Filter: (o.id_worker_create = w.id)
  • Rows Removed by Join Filter: 720306
6. 1,139.948 780,494.603 ↓ 32.0 32 1

Nested Loop (cost=3.27..2,683,462.17 rows=1 width=8,542) (actual time=32,438.362..780,494.603 rows=32 loops=1)

7. 9,085.326 772,050.435 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=2.85..2,682,551.82 rows=325 width=1,425) (actual time=5.227..772,050.435 rows=811,580 loops=1)

  • Join Filter: ((o.c_status)::text = (s.c_status)::text)
  • Rows Removed by Join Filter: 62703807
8. 1,211.245 758,095.629 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=2.85..2,682,354.30 rows=325 width=1,397) (actual time=5.150..758,095.629 rows=811,580 loops=1)

9. 2,115.501 748,768.584 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=2.43..2,681,450.20 rows=325 width=1,397) (actual time=4.693..748,768.584 rows=811,580 loops=1)

10. 2,381.830 736,914.123 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=2.00..2,680,542.31 rows=325 width=1,344) (actual time=4.650..736,914.123 rows=811,580 loops=1)

  • Join Filter: (a.id_color = cr.id)
  • Rows Removed by Join Filter: 16929478
11. 128,696.957 732,909.133 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=2.00..2,680,421.99 rows=325 width=1,320) (actual time=4.623..732,909.133 rows=811,580 loops=1)

  • Join Filter: (a.id_mark = am.id)
  • Rows Removed by Join Filter: 1125125577
12. 1,718.857 522,242.596 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=2.00..2,676,159.76 rows=325 width=1,310) (actual time=4.364..522,242.596 rows=811,580 loops=1)

13. 207,361.161 508,350.039 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=1.57..2,675,251.90 rows=325 width=1,296) (actual time=4.344..508,350.039 rows=811,580 loops=1)

  • Join Filter: (o.id_base = b_1.id)
  • Rows Removed by Join Filter: 1783899478
14. 1,311.774 170,324.498 ↓ 2,497.2 811,580 1

Nested Loop Left Join (cost=1.57..2,663,173.00 rows=325 width=1,263) (actual time=2.391..170,324.498 rows=811,580 loops=1)

15. 4,755.423 162,520.084 ↓ 2,497.2 811,580 1

Nested Loop (cost=1.14..2,662,264.31 rows=325 width=1,179) (actual time=2.371..162,520.084 rows=811,580 loops=1)

16. 134,228.377 134,228.377 ↓ 1.2 811,596 1

Index Scan using ix_ta_orders_c_date_create on ta_orders o (cost=0.57..729,235.16 rows=658,434 width=1,195) (actual time=1.248..134,228.377 rows=811,596 loops=1)

  • Index Cond: ((c_date_create >= '2019-11-19 03:00:00+00'::timestamp with time zone) AND (c_date_create <= '2019-11-19 15:00:00+00'::timestamp with time zone))
17. 23,536.284 23,536.284 ↑ 1.0 1 811,596

Index Scan using ix_ta_orders_tariff_id_order on ta_orders_tariff aot (cost=0.57..2.93 rows=1 width=28) (actual time=0.027..0.029 rows=1 loops=811,596)

  • Index Cond: (id_order = o.id)
  • Filter: (o.id_tariff = id_tariff)
  • Rows Removed by Filter: 0
18. 6,492.640 6,492.640 ↓ 0.0 0 811,580

Index Scan using pk_ta_orders_ext on ta_orders_ext ord_ext (cost=0.43..2.80 rows=1 width=92) (actual time=0.008..0.008 rows=0 loops=811,580)

  • Index Cond: (o.id = id)
19. 130,662.802 130,664.380 ↑ 2.8 2,199 811,580

Materialize (cost=0.00..138.79 rows=6,131 width=37) (actual time=0.000..0.161 rows=2,199 loops=811,580)

20. 1.578 1.578 ↓ 1.0 6,166 1

Seq Scan on t_bases b_1 (cost=0.00..108.13 rows=6,131 width=37) (actual time=0.008..1.578 rows=6,166 loops=1)

21. 12,173.700 12,173.700 ↑ 1.0 1 811,580

Index Scan using pk_t_auto on t_auto a (cost=0.43..2.79 rows=1 width=22) (actual time=0.015..0.015 rows=1 loops=811,580)

  • Index Cond: (o.id_auto = id)
22. 81,968.864 81,969.580 ↑ 1.6 1,387 811,580

Materialize (cost=0.00..42.00 rows=2,167 width=18) (actual time=0.000..0.101 rows=1,387 loops=811,580)

23. 0.716 0.716 ↑ 1.0 2,167 1

Seq Scan on t_auto_mark am (cost=0.00..31.17 rows=2,167 width=18) (actual time=0.007..0.716 rows=2,167 loops=1)

24. 1,623.137 1,623.160 ↑ 2.8 22 811,580

Materialize (cost=0.00..1.37 rows=62 width=28) (actual time=0.000..0.002 rows=22 loops=811,580)

25. 0.023 0.023 ↑ 1.0 62 1

Seq Scan on t_colors cr (cost=0.00..1.06 rows=62 width=28) (actual time=0.006..0.023 rows=62 loops=1)

26. 9,738.960 9,738.960 ↑ 1.0 1 811,580

Index Scan using pk_t_drivers on t_drivers d (cost=0.43..2.79 rows=1 width=57) (actual time=0.012..0.012 rows=1 loops=811,580)

  • Index Cond: (o.id_driver = id)
27. 8,115.800 8,115.800 ↑ 1.0 1 811,580

Index Scan using pk_t_zones on t_zones ze (cost=0.42..2.78 rows=1 width=12) (actual time=0.010..0.010 rows=1 loops=811,580)

  • Index Cond: (o.id_zone_end = id)
28. 4,869.449 4,869.480 ↑ 1.3 78 811,580

Materialize (cost=0.00..2.61 rows=101 width=39) (actual time=0.000..0.006 rows=78 loops=811,580)

29. 0.031 0.031 ↑ 1.3 79 1

Seq Scan on t_status s (cost=0.00..2.10 rows=101 width=39) (actual time=0.010..0.031 rows=79 loops=1)

30. 7,304.220 7,304.220 ↓ 0.0 0 811,580

Index Scan using pk_t_tariff on t_tariff t (cost=0.42..2.79 rows=1 width=30) (actual time=0.009..0.009 rows=0 loops=811,580)

  • Index Cond: (id = o.id_tariff)
  • Filter: ((c_name)::text = 'Эвакуатор'::text)
  • Rows Removed by Filter: 1
31. 225.472 225.472 ↑ 1.4 22,511 32

Seq Scan on t_workers w (cost=0.00..3,130.02 rows=31,023 width=8) (actual time=0.005..7.046 rows=22,511 loops=32)

Planning time : 21.541 ms
Execution time : 780,929.295 ms