explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2au2

Settings
# exclusive inclusive rows x rows loops node
1. 673.757 37,758.257 ↑ 12.0 218,588 1

WindowAgg (cost=787,924.43..940,242.21 rows=2,619,288 width=1,326) (actual time=35,860.289..37,758.257 rows=218,588 loops=1)

2. 834.983 37,084.500 ↑ 12.0 218,588 1

Hash Join (cost=787,924.43..842,018.91 rows=2,619,288 width=1,318) (actual time=35,860.246..37,084.500 rows=218,588 loops=1)

  • Hash Cond: ((first_propositions.unit_id = lu.id) AND (first_propositions.supplier_id = last_propositions.supplier_id))
3. 92.812 4,096.511 ↑ 1.5 435,962 1

Subquery Scan on first_propositions (cost=321,840.27..335,134.31 rows=664,702 width=40) (actual time=3,649.813..4,096.511 rows=435,962 loops=1)

4. 179.662 4,003.699 ↑ 1.5 435,962 1

Unique (cost=321,840.27..328,487.29 rows=664,702 width=40) (actual time=3,649.809..4,003.699 rows=435,962 loops=1)

5. 547.107 3,824.037 ↑ 1.5 436,721 1

Sort (cost=321,840.27..323,502.02 rows=664,702 width=40) (actual time=3,649.808..3,824.037 rows=436,721 loops=1)

  • Sort Key: a.supplier_id, au.unit_id, au.pos_price
  • Sort Method: external merge Disk: 10424kB
6. 20.897 3,276.930 ↑ 1.5 436,721 1

Append (cost=157,612.58..239,380.28 rows=664,702 width=40) (actual time=2,169.905..3,276.930 rows=436,721 loops=1)

7. 620.502 3,178.059 ↑ 1.5 436,433 1

Hash Left Join (cost=157,612.58..207,141.43 rows=654,914 width=14) (actual time=2,169.904..3,178.059 rows=436,433 loops=1)

  • Hash Cond: ((first_app_unit_dates.supplier_id = a.supplier_id) AND (first_app_unit_dates.unit_id = au.unit_id) AND (first_app_unit_dates.first_date_published = a.date_published))
8. 43.819 1,438.971 ↑ 1.5 436,433 1

Subquery Scan on first_app_unit_dates (cost=107,748.19..127,395.61 rows=654,914 width=16) (actual time=1,048.389..1,438.971 rows=436,433 loops=1)

9. 208.078 1,395.152 ↑ 1.5 436,433 1

GroupAggregate (cost=107,748.19..120,846.47 rows=654,914 width=24) (actual time=1,048.388..1,395.152 rows=436,433 loops=1)

  • Group Key: au_1.unit_id, a_1.supplier_id
10. 558.238 1,187.074 ↓ 1.0 656,038 1

Sort (cost=107,748.19..109,385.47 rows=654,914 width=16) (actual time=1,048.376..1,187.074 rows=656,038 loops=1)

  • Sort Key: au_1.unit_id, a_1.supplier_id
  • Sort Method: external merge Disk: 16736kB
11. 306.055 628.836 ↓ 1.0 656,038 1

Hash Left Join (cost=7,693.87..33,287.40 rows=654,914 width=16) (actual time=115.847..628.836 rows=656,038 loops=1)

  • Hash Cond: (au_1.application_id = a_1.id)
12. 207.751 207.751 ↓ 1.0 656,038 1

Seq Scan on application_units au_1 (cost=0.00..18,079.31 rows=654,914 width=8) (actual time=0.034..207.751 rows=656,038 loops=1)

  • Filter: pos_is_proposition
  • Rows Removed by Filter: 205993
13. 40.566 115.030 ↑ 1.0 115,372 1

Hash (cost=5,574.72..5,574.72 rows=115,372 width=20) (actual time=115.030..115.030 rows=115,372 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 3648kB
14. 74.464 74.464 ↑ 1.0 115,372 1

Seq Scan on applications a_1 (cost=0.00..5,574.72 rows=115,372 width=20) (actual time=0.030..74.464 rows=115,372 loops=1)

15. 390.035 1,118.586 ↓ 1.0 655,222 1

Hash (cost=34,565.40..34,565.40 rows=654,914 width=22) (actual time=1,118.586..1,118.586 rows=655,222 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 2841kB
16. 379.127 728.551 ↓ 1.0 656,038 1

Hash Join (cost=7,693.87..34,565.40 rows=654,914 width=22) (actual time=92.599..728.551 rows=656,038 loops=1)

  • Hash Cond: (au.application_id = a.id)
17. 257.668 257.668 ↓ 1.0 656,038 1

Seq Scan on application_units au (cost=0.00..18,079.31 rows=654,914 width=14) (actual time=0.026..257.668 rows=656,038 loops=1)

  • Filter: pos_is_proposition
  • Rows Removed by Filter: 205993
18. 30.102 91.756 ↑ 1.0 115,372 1

Hash (cost=5,574.72..5,574.72 rows=115,372 width=20) (actual time=91.756..91.756 rows=115,372 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 3648kB
19. 61.654 61.654 ↑ 1.0 115,372 1

Seq Scan on applications a (cost=0.00..5,574.72 rows=115,372 width=20) (actual time=0.028..61.654 rows=115,372 loops=1)

20. 0.715 77.974 ↑ 34.0 288 1

Hash Left Join (cost=21,937.97..22,268.32 rows=9,788 width=40) (actual time=77.287..77.974 rows=288 loops=1)

  • Hash Cond: ((a_3.supplier_id = a_2.supplier_id) AND (lu_2.id = lu_1.id) AND ((min(o_1.date_added)) = o.date_added))
21. 0.699 24.626 ↑ 34.8 281 1

HashAggregate (cost=11,491.54..11,589.42 rows=9,788 width=20) (actual time=24.495..24.626 rows=281 loops=1)

  • Group Key: lu_2.id, a_3.supplier_id
22. 0.410 23.927 ↑ 6.1 1,609 1

Nested Loop Left Join (cost=1,809.20..11,418.13 rows=9,788 width=16) (actual time=15.761..23.927 rows=1,609 loops=1)

23. 0.638 20.301 ↑ 1.0 1,608 1

Hash Left Join (cost=1,808.78..9,269.14 rows=1,608 width=16) (actual time=15.727..20.301 rows=1,608 loops=1)

  • Hash Cond: (o_1.lot_id = l_2.id)
24. 0.703 4.098 ↑ 1.0 1,608 1

Nested Loop Left Join (cost=0.42..7,456.56 rows=1,608 width=16) (actual time=0.059..4.098 rows=1,608 loops=1)

25. 0.179 0.179 ↑ 1.0 1,608 1

Seq Scan on offers o_1 (cost=0.00..33.08 rows=1,608 width=16) (actual time=0.023..0.179 rows=1,608 loops=1)

26. 3.216 3.216 ↑ 1.0 1 1,608

Index Scan using applications_pkey on applications a_3 (cost=0.42..4.62 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=1,608)

  • Index Cond: (id = o_1.application_id)
27. 4.694 15.565 ↑ 1.0 28,409 1

Hash (cost=1,453.25..1,453.25 rows=28,409 width=4) (actual time=15.565..15.565 rows=28,409 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1255kB
28. 10.871 10.871 ↑ 1.0 28,409 1

Seq Scan on lots l_2 (cost=0.00..1,453.25 rows=28,409 width=4) (actual time=0.010..10.871 rows=28,409 loops=1)

  • Filter: actual
  • Rows Removed by Filter: 116
29. 3.216 3.216 ↑ 12.0 1 1,608

Index Scan using lot_units_idx_lot_id on lot_units lu_2 (cost=0.42..1.22 rows=12 width=8) (actual time=0.002..0.002 rows=1 loops=1,608)

  • Index Cond: (lot_id = l_2.id)
30. 0.750 52.633 ↑ 6.0 1,609 1

Hash (cost=10,276.52..10,276.52 rows=9,709 width=24) (actual time=52.632..52.633 rows=1,609 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 216kB
31. 28.244 51.883 ↑ 6.0 1,609 1

Gather (cost=3,623.15..10,276.52 rows=9,709 width=24) (actual time=31.262..51.883 rows=1,609 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
32. 2.790 23.639 ↑ 7.1 805 2

Nested Loop (cost=2,623.15..8,305.62 rows=5,711 width=24) (actual time=14.288..23.639 rows=805 loops=2)

33. 3.017 20.846 ↑ 1.2 804 2

Nested Loop (cost=2,622.73..7,049.79 rows=938 width=28) (actual time=14.277..20.846 rows=804 loops=2)

34. 1.891 17.826 ↑ 1.2 804 2

Merge Join (cost=2,622.31..2,719.43 rows=938 width=28) (actual time=14.263..17.826 rows=804 loops=2)

  • Merge Cond: (l_1.id = o.lot_id)
35. 7.900 14.628 ↑ 1.2 13,760 2

Sort (cost=2,502.69..2,544.29 rows=16,643 width=4) (actual time=13.637..14.628 rows=13,760 loops=2)

  • Sort Key: l_1.id
  • Sort Method: quicksort Memory: 2100kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
36. 6.728 6.728 ↑ 1.2 14,205 2

Parallel Seq Scan on lots l_1 (cost=0.00..1,335.79 rows=16,643 width=4) (actual time=0.007..6.728 rows=14,205 loops=2)

  • Filter: (actual AND actual)
  • Rows Removed by Filter: 58
37. 0.760 1.307 ↑ 1.0 1,608 1

Sort (cost=118.71..122.73 rows=1,608 width=24) (actual time=1.127..1.307 rows=1,608 loops=1)

  • Sort Key: o.lot_id
  • Sort Method: quicksort Memory: 174kB
38. 0.547 0.547 ↑ 1.0 1,608 1

Seq Scan on offers o (cost=0.00..33.08 rows=1,608 width=24) (actual time=0.059..0.547 rows=1,608 loops=1)

39. 0.003 0.003 ↑ 1.0 1 1,608

Index Scan using applications_pkey on applications a_2 (cost=0.42..4.62 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=1,608)

  • Index Cond: (id = o.application_id)
40. 0.003 0.003 ↑ 12.0 1 1,608

Index Scan using lot_units_idx_lot_id on lot_units lu_1 (cost=0.42..1.22 rows=12 width=8) (actual time=0.003..0.003 rows=1 loops=1,608)

  • Index Cond: (lot_id = l_1.id)
41. 545.869 32,153.006 ↓ 1.4 218,242 1

Hash (cost=438,320.83..438,320.83 rows=157,622 width=1,294) (actual time=32,153.006..32,153.006 rows=218,242 loops=1)

  • Buckets: 4096 Batches: 64 Memory Usage: 1665kB
42. 100.879 31,607.137 ↓ 1.4 218,242 1

Nested Loop Left Join (cost=349,106.52..438,320.83 rows=157,622 width=1,294) (actual time=29,090.452..31,607.137 rows=218,242 loops=1)

  • Join Filter: (luw.winner_id = c_sup.id)
  • Rows Removed by Join Filter: 122977
43. 122.169 30,633.290 ↓ 1.4 218,242 1

Hash Left Join (cost=349,106.23..385,171.16 rows=157,622 width=1,294) (actual time=29,090.428..30,633.290 rows=218,242 loops=1)

  • Hash Cond: (last_propositions.supplier_id = c_sup.id)
44. 127.283 30,501.878 ↓ 1.4 218,242 1

Hash Left Join (cost=347,979.99..383,630.97 rows=157,622 width=1,173) (actual time=29,081.112..30,501.878 rows=218,242 loops=1)

  • Hash Cond: (p.organizer_user_id = u.id)
45. 708.859 30,352.140 ↓ 1.4 218,242 1

Hash Join (cost=346,437.19..381,674.24 rows=157,622 width=1,129) (actual time=29,058.616..30,352.140 rows=218,242 loops=1)

  • Hash Cond: (last_propositions.unit_id = lu.id)
46. 118.677 28,289.745 ↑ 1.1 433,502 1

Subquery Scan on last_propositions (cost=286,630.32..298,731.04 rows=484,029 width=80) (actual time=27,702.051..28,289.745 rows=433,502 loops=1)

47. 234.513 28,171.068 ↑ 1.1 433,502 1

Unique (cost=286,630.32..293,890.75 rows=484,029 width=80) (actual time=27,702.047..28,171.068 rows=433,502 loops=1)

48. 599.922 27,936.555 ↑ 1.1 433,502 1

Sort (cost=286,630.32..287,840.39 rows=484,029 width=80) (actual time=27,702.045..27,936.555 rows=433,502 loops=1)

  • Sort Key: a_4.supplier_id, au_2.unit_id, au_2.pos_price, ((au_2.pos_price * (au_2.pos_quantity)::numeric)), last_app_unit_dates.propositions_count
  • Sort Method: external merge Disk: 18016kB
49. 19.908 27,336.633 ↑ 1.1 433,502 1

Append (cost=137,095.33..219,419.02 rows=484,029 width=80) (actual time=25,597.906..27,336.633 rows=433,502 loops=1)

50. 968.370 27,166.678 ↑ 1.1 433,218 1

Hash Right Join (cost=137,095.33..189,760.85 rows=474,241 width=54) (actual time=25,597.904..27,166.678 rows=433,218 loops=1)

  • Hash Cond: ((a_4.supplier_id = last_app_unit_dates.supplier_id) AND (au_2.unit_id = last_app_unit_dates.unit_id) AND (a_4.date_published = last_app_unit_dates.last_date_published))
51. 390.518 696.524 ↑ 1.0 862,031 1

Hash Join (cost=7,693.87..37,133.09 rows=862,031 width=24) (actual time=95.239..696.524 rows=862,031 loops=1)

  • Hash Cond: (au_2.application_id = a_4.id)
52. 211.679 211.679 ↑ 1.0 862,031 1

Seq Scan on application_units au_2 (cost=0.00..18,079.31 rows=862,031 width=16) (actual time=0.034..211.679 rows=862,031 loops=1)

53. 30.853 94.327 ↑ 1.0 115,372 1

Hash (cost=5,574.72..5,574.72 rows=115,372 width=20) (actual time=94.327..94.327 rows=115,372 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 3648kB
54. 63.474 63.474 ↑ 1.0 115,372 1

Seq Scan on applications a_4 (cost=0.00..5,574.72 rows=115,372 width=20) (actual time=0.058..63.474 rows=115,372 loops=1)

55. 213.772 25,501.784 ↑ 1.1 433,218 1

Hash (cost=118,323.25..118,323.25 rows=474,241 width=24) (actual time=25,501.783..25,501.784 rows=433,218 loops=1)

  • Buckets: 65536 Batches: 8 Memory Usage: 3481kB
56. 62.848 25,288.012 ↑ 1.1 433,218 1

Subquery Scan on last_app_unit_dates (cost=54,824.54..118,323.25 rows=474,241 width=24) (actual time=24,553.748..25,288.012 rows=433,218 loops=1)

57. 284.648 25,225.164 ↑ 1.1 433,218 1

Finalize GroupAggregate (cost=54,824.54..113,580.84 rows=474,241 width=24) (actual time=24,553.743..25,225.164 rows=433,218 loops=1)

  • Group Key: au_3.unit_id, a_5.supplier_id
58. 0.000 24,940.516 ↓ 1.4 550,572 1

Gather Merge (cost=54,824.54..104,886.43 rows=395,200 width=24) (actual time=24,553.707..24,940.516 rows=550,572 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
59. 346.632 73,677.579 ↑ 1.1 183,524 3

Partial GroupAggregate (cost=53,824.52..58,270.52 rows=197,600 width=24) (actual time=24,394.238..24,559.193 rows=183,524 loops=3)

  • Group Key: au_3.unit_id, a_5.supplier_id
60. 997.821 73,330.947 ↓ 1.1 222,260 3

Sort (cost=53,824.52..54,318.52 rows=197,600 width=20) (actual time=24,394.208..24,443.649 rows=222,260 loops=3)

  • Sort Key: au_3.unit_id, a_5.supplier_id
  • Sort Method: external merge Disk: 6696kB
  • Worker 0: Sort Method: external merge Disk: 6752kB
  • Worker 1: Sort Method: external merge Disk: 6144kB
61. 647.553 72,333.126 ↓ 1.1 222,260 3

Parallel Hash Left Join (cost=16,671.51..32,390.40 rows=197,600 width=20) (actual time=23,597.276..24,111.042 rows=222,260 loops=3)

  • Hash Cond: ((au_3.unit_id = au_4.unit_id) AND (a_5.supplier_id = a_6.supplier_id))
  • Filter: (au_4.pos_is_proposition OR (au_4.pos_is_proposition IS NULL))
  • Rows Removed by Filter: 1192
62. 488.568 1,166.385 ↑ 1.2 218,407 3

Parallel Hash Join (cost=5,474.45..19,241.58 rows=260,092 width=20) (actual time=90.708..388.795 rows=218,407 loops=3)

  • Hash Cond: (au_3.application_id = a_5.id)
63. 466.122 466.122 ↑ 1.2 218,679 3

Parallel Seq Scan on application_units au_3 (cost=0.00..13,050.80 rows=272,881 width=12) (actual time=0.009..155.374 rows=218,679 loops=3)

  • Filter: pos_is_proposition
  • Rows Removed by Filter: 68664
64. 68.955 211.695 ↑ 1.3 36,621 3

Parallel Hash (cost=4,901.72..4,901.72 rows=45,819 width=20) (actual time=70.565..70.565 rows=36,621 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 7104kB
65. 142.740 142.740 ↑ 1.3 36,621 3

Parallel Seq Scan on applications a_5 (cost=0.00..4,901.72 rows=45,819 width=20) (actual time=0.136..47.580 rows=36,621 loops=3)

  • Filter: (date_published IS NOT NULL)
  • Rows Removed by Filter: 1836
66. 452.988 70,519.188 ↓ 2.4 49,209 3

Parallel Hash (cost=10,886.22..10,886.22 rows=20,722 width=9) (actual time=23,506.396..23,506.396 rows=49,209 loops=3)

  • Buckets: 262144 (originally 65536) Batches: 1 (originally 1) Memory Usage: 10560kB
67. 68.643 70,066.200 ↓ 2.4 49,209 3

Nested Loop (cost=1,586.88..10,886.22 rows=20,722 width=9) (actual time=13.283..23,355.400 rows=49,209 loops=3)

68. 81.048 234.477 ↓ 2.1 5,785 3

Parallel Hash Join (cost=1,586.46..6,740.55 rows=2,773 width=12) (actual time=13.151..78.159 rows=5,785 loops=3)

  • Hash Cond: ((a_6.lot_id = l_3.id) AND (a_6.last_peretorg_number = l_3.peretorg_number))
69. 116.202 116.202 ↑ 1.3 38,457 3

Parallel Seq Scan on applications a_6 (cost=0.00..4,901.72 rows=48,072 width=20) (actual time=0.646..38.734 rows=38,457 loops=3)

70. 8.476 37.227 ↑ 1.8 9,470 3

Parallel Hash (cost=1,335.79..1,335.79 rows=16,711 width=8) (actual time=12.409..12.409 rows=9,470 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 928kB
71. 28.751 28.751 ↓ 1.7 28,409 1

Parallel Seq Scan on lots l_3 (cost=0.00..1,335.79 rows=16,711 width=8) (actual time=0.019..28.751 rows=28,409 loops=1)

  • Filter: actual
  • Rows Removed by Filter: 116
72. 69,763.080 69,763.080 ↑ 2.7 9 17,354

Index Scan using application_units_idx_application_id on application_units au_4 (cost=0.42..1.26 rows=24 width=9) (actual time=3.430..4.020 rows=9 loops=17,354)

  • Index Cond: (application_id = a_6.id)
73. 1.209 150.047 ↑ 34.5 284 1

Hash Left Join (cost=21,993.97..22,397.74 rows=9,788 width=80) (actual time=148.717..150.047 rows=284 loops=1)

  • Hash Cond: ((a_8.supplier_id = a_7.supplier_id) AND (lu_4.id = lu_3.id) AND ((max(o_3.date_added)) = o_2.date_added))
74. 0.845 25.516 ↑ 34.8 281 1

HashAggregate (cost=11,516.01..11,613.89 rows=9,788 width=28) (actual time=25.287..25.516 rows=281 loops=1)

  • Group Key: lu_4.id, a_8.supplier_id
75. 0.573 24.671 ↑ 6.1 1,609 1

Nested Loop Left Join (cost=1,809.20..11,418.13 rows=9,788 width=24) (actual time=15.987..24.671 rows=1,609 loops=1)

76. 0.621 20.882 ↑ 1.0 1,608 1

Hash Left Join (cost=1,808.78..9,269.14 rows=1,608 width=24) (actual time=15.965..20.882 rows=1,608 loops=1)

  • Hash Cond: (o_3.lot_id = l_5.id)
77. 1.001 4.418 ↑ 1.0 1,608 1

Nested Loop Left Join (cost=0.42..7,456.56 rows=1,608 width=24) (actual time=0.065..4.418 rows=1,608 loops=1)

78. 0.201 0.201 ↑ 1.0 1,608 1

Seq Scan on offers o_3 (cost=0.00..33.08 rows=1,608 width=24) (actual time=0.027..0.201 rows=1,608 loops=1)

79. 3.216 3.216 ↑ 1.0 1 1,608

Index Scan using applications_pkey on applications a_8 (cost=0.42..4.62 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=1,608)

  • Index Cond: (id = o_3.application_id)
80. 4.525 15.843 ↑ 1.0 28,409 1

Hash (cost=1,453.25..1,453.25 rows=28,409 width=4) (actual time=15.843..15.843 rows=28,409 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1255kB
81. 11.318 11.318 ↑ 1.0 28,409 1

Seq Scan on lots l_5 (cost=0.00..1,453.25 rows=28,409 width=4) (actual time=0.011..11.318 rows=28,409 loops=1)

  • Filter: actual
  • Rows Removed by Filter: 116
82. 3.216 3.216 ↑ 12.0 1 1,608

Index Scan using lot_units_idx_lot_id on lot_units lu_4 (cost=0.42..1.22 rows=12 width=8) (actual time=0.002..0.002 rows=1 loops=1,608)

  • Index Cond: (lot_id = l_5.id)
83. 0.605 123.322 ↑ 6.1 1,609 1

Hash (cost=10,307.41..10,307.41 rows=9,746 width=32) (actual time=123.322..123.322 rows=1,609 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 231kB
84. 101.892 122.717 ↑ 6.1 1,609 1

Gather (cost=3,628.41..10,307.41 rows=9,746 width=32) (actual time=30.859..122.717 rows=1,609 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
85. 2.015 20.825 ↑ 7.1 805 2

Nested Loop (cost=2,628.41..8,332.81 rows=5,733 width=32) (actual time=13.611..20.825 rows=805 loops=2)

86. 2.026 18.808 ↑ 1.2 804 2

Nested Loop (cost=2,627.99..7,073.89 rows=942 width=28) (actual time=13.600..18.808 rows=804 loops=2)

87. 1.860 16.780 ↑ 1.2 804 2

Merge Join (cost=2,627.57..2,725.06 rows=942 width=28) (actual time=13.581..16.780 rows=804 loops=2)

  • Merge Cond: (l_4.id = o_2.lot_id)
88. 6.880 14.069 ↑ 1.2 13,760 2

Sort (cost=2,507.95..2,549.72 rows=16,711 width=4) (actual time=13.167..14.069 rows=13,760 loops=2)

  • Sort Key: l_4.id
  • Sort Method: quicksort Memory: 2100kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
89. 7.189 7.189 ↑ 1.2 14,205 2

Parallel Seq Scan on lots l_4 (cost=0.00..1,335.79 rows=16,711 width=4) (actual time=0.035..7.189 rows=14,205 loops=2)

  • Filter: actual
  • Rows Removed by Filter: 58
90. 0.534 0.851 ↑ 1.0 1,608 1

Sort (cost=118.71..122.73 rows=1,608 width=24) (actual time=0.710..0.851 rows=1,608 loops=1)

  • Sort Key: o_2.lot_id
  • Sort Method: quicksort Memory: 174kB
91. 0.317 0.317 ↑ 1.0 1,608 1

Seq Scan on offers o_2 (cost=0.00..33.08 rows=1,608 width=24) (actual time=0.023..0.317 rows=1,608 loops=1)

92. 0.002 0.002 ↑ 1.0 1 1,608

Index Scan using applications_pkey on applications a_7 (cost=0.42..4.62 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=1,608)

  • Index Cond: (id = o_2.application_id)
93. 0.002 0.002 ↑ 12.0 1 1,608

Index Scan using lot_units_idx_lot_id on lot_units lu_3 (cost=0.42..1.22 rows=12 width=16) (actual time=0.002..0.002 rows=1 loops=1,608)

  • Index Cond: (lot_id = l_4.id)
94. 0.000 1,353.536 ↓ 1.3 74,067 1

Hash (cost=51,645.05..51,645.05 rows=56,545 width=1,049) (actual time=1,353.535..1,353.536 rows=74,067 loops=1)

  • Buckets: 4096 Batches: 16 Memory Usage: 1317kB
95. 364.204 1,481.857 ↓ 1.3 74,067 1

Gather (cost=37,087.90..51,645.05 rows=56,545 width=1,049) (actual time=964.265..1,481.857 rows=74,067 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
96. 21.435 1,117.653 ↓ 1.0 24,689 3

Hash Left Join (cost=36,087.90..44,990.55 rows=23,560 width=1,049) (actual time=855.771..1,117.653 rows=24,689 loops=3)

  • Hash Cond: (l.id = tl.lot_id)
  • Filter: (((17 = p.procedure_type) AND (tl.propositions_accepted > 0)) OR (tl.propositions_accepted IS NULL))
  • Rows Removed by Filter: 4
97. 14.124 1,079.988 ↑ 1.6 24,693 3

Hash Left Join (cost=35,208.09..44,004.42 rows=40,498 width=1,057) (actual time=839.298..1,079.988 rows=24,693 loops=3)

  • Hash Cond: (p.organizer_contragent_id = c.id)
98. 12.241 1,057.539 ↑ 1.6 24,693 3

Hash Left Join (cost=34,081.85..42,771.83 rows=40,498 width=1,030) (actual time=830.902..1,057.539 rows=24,693 loops=3)

  • Hash Cond: (p.currency = vc.id)
99. 12.575 1,045.171 ↑ 1.6 24,693 3

Hash Left Join (cost=34,080.04..42,651.19 rows=40,498 width=716) (actual time=830.757..1,045.171 rows=24,693 loops=3)

  • Hash Cond: (p.procedure_type = vpt.id)
100. 22.856 1,032.433 ↑ 1.6 24,693 3

Parallel Hash Left Join (cost=34,078.55..42,522.91 rows=40,498 width=200) (actual time=830.576..1,032.433 rows=24,693 loops=3)

  • Hash Cond: (l.procedure_id = p.id)
101. 15.073 982.473 ↑ 1.6 24,693 3

Hash Left Join (cost=31,295.40..39,633.44 rows=40,498 width=165) (actual time=801.553..982.473 rows=24,693 loops=3)

  • Hash Cond: ((lu.category_code)::text = (nc.code)::text)
102. 482.605 967.002 ↑ 1.6 24,693 3

Parallel Hash Left Join (cost=31,280.50..39,511.26 rows=40,498 width=146) (actual time=801.071..967.002 rows=24,693 loops=3)

  • Hash Cond: (lu.dictionary_position_id = ndp.id)
103. 37.793 75.338 ↑ 1.6 24,693 3

Parallel Hash Join (cost=1,495.14..6,094.59 rows=40,498 width=109) (actual time=9.963..75.338 rows=24,693 loops=3)

  • Hash Cond: (lu.lot_id = l.id)
104. 27.744 27.744 ↑ 1.2 57,880 3

Parallel Seq Scan on lot_units lu (cost=0.00..4,409.50 rows=72,350 width=89) (actual time=0.096..27.744 rows=57,880 loops=3)

105. 2.581 9.801 ↑ 1.9 4,921 3

Parallel Hash (cost=1,377.74..1,377.74 rows=9,392 width=24) (actual time=9.801..9.801 rows=4,921 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 1120kB
106. 7.220 7.220 ↑ 1.9 4,921 3

Parallel Seq Scan on lots l (cost=0.00..1,377.74 rows=9,392 width=24) (actual time=0.029..7.220 rows=4,921 loops=3)

  • Filter: (actual AND (cancel_basis IS NULL) AND (status = 8))
  • Rows Removed by Filter: 4587
107. 177.954 409.059 ↑ 1.2 198,271 3

Parallel Hash (cost=24,508.38..24,508.38 rows=247,838 width=45) (actual time=409.059..409.059 rows=198,271 loops=3)

  • Buckets: 65536 Batches: 16 Memory Usage: 3488kB
108. 231.105 231.105 ↑ 1.2 198,271 3

Parallel Seq Scan on nsi_dictionary_position ndp (cost=0.00..24,508.38 rows=247,838 width=45) (actual time=0.523..231.105 rows=198,271 loops=3)

109. 0.150 0.398 ↑ 1.0 351 3

Hash (cost=10.51..10.51 rows=351 width=41) (actual time=0.398..0.398 rows=351 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 34kB
110. 0.248 0.248 ↑ 1.0 351 3

Seq Scan on nsi_category nc (cost=0.00..10.51 rows=351 width=41) (actual time=0.153..0.248 rows=351 loops=3)

111. 0.000 27.104 ↑ 1.8 9,725 3

Parallel Hash (cost=2,568.62..2,568.62 rows=17,162 width=43) (actual time=27.104..27.104 rows=9,725 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 2496kB
112. 62.202 62.202 ↓ 1.7 29,176 1

Parallel Seq Scan on procedures p (cost=0.00..2,568.62 rows=17,162 width=43) (actual time=0.045..62.202 rows=29,176 loops=1)

113. 0.017 0.163 ↑ 1.0 22 3

Hash (cost=1.22..1.22 rows=22 width=520) (actual time=0.163..0.163 rows=22 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
114. 0.146 0.146 ↑ 1.0 22 3

Seq Scan on vocab_procedure_types vpt (cost=0.00..1.22 rows=22 width=520) (actual time=0.140..0.146 rows=22 loops=3)

115. 0.014 0.127 ↑ 1.0 36 3

Hash (cost=1.36..1.36 rows=36 width=322) (actual time=0.127..0.127 rows=36 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
116. 0.113 0.113 ↑ 1.0 36 3

Seq Scan on vocab_currency vc (cost=0.00..1.36 rows=36 width=322) (actual time=0.105..0.113 rows=36 loops=3)

117. 3.460 8.325 ↑ 1.0 9,344 3

Hash (cost=1,009.44..1,009.44 rows=9,344 width=35) (actual time=8.325..8.325 rows=9,344 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 681kB
118. 4.865 4.865 ↑ 1.0 9,344 3

Seq Scan on contragents c (cost=0.00..1,009.44 rows=9,344 width=35) (actual time=0.099..4.865 rows=9,344 loops=3)

119. 7.325 16.230 ↑ 1.0 28,525 3

Hash (cost=523.25..523.25 rows=28,525 width=8) (actual time=16.230..16.230 rows=28,525 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 1319kB
120. 8.905 8.905 ↑ 1.0 28,525 3

Seq Scan on tmk_lots tl (cost=0.00..523.25 rows=28,525 width=8) (actual time=0.195..8.905 rows=28,525 loops=3)

121. 4.811 22.455 ↑ 1.0 10,258 1

Hash (cost=1,414.58..1,414.58 rows=10,258 width=52) (actual time=22.455..22.455 rows=10,258 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1003kB
122. 17.644 17.644 ↑ 1.0 10,258 1

Seq Scan on users u (cost=0.00..1,414.58 rows=10,258 width=52) (actual time=0.040..17.644 rows=10,258 loops=1)

123. 4.558 9.243 ↑ 1.0 9,344 1

Hash (cost=1,009.44..1,009.44 rows=9,344 width=121) (actual time=9.243..9.243 rows=9,344 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1486kB
124. 4.685 4.685 ↑ 1.0 9,344 1

Seq Scan on contragents c_sup (cost=0.00..1,009.44 rows=9,344 width=121) (actual time=0.019..4.685 rows=9,344 loops=1)

125. 872.968 872.968 ↑ 1.0 1 218,242

Index Scan using tmk_lot_unit_winner_lot_unit_id_application_id_key on tmk_lot_unit_winner luw (cost=0.29..0.32 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=218,242)

  • Index Cond: (lot_unit_id = lu.id)
Planning time : 59.922 ms