explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OF7N

Settings
# exclusive inclusive rows x rows loops node
1. 0.077 2.161 ↑ 1.0 11 1

Sort (cost=144.16..144.19 rows=11 width=16,528) (actual time=2.160..2.161 rows=11 loops=1)

  • Sort Key: pait.lft
  • Sort Method: quicksort Memory: 40kB
2. 0.053 2.084 ↑ 1.0 11 1

Nested Loop Left Join (cost=118.59..143.97 rows=11 width=16,528) (actual time=1.879..2.084 rows=11 loops=1)

3. 0.057 1.976 ↓ 11.0 11 1

Nested Loop Left Join (cost=113.91..128.15 rows=1 width=14,936) (actual time=1.831..1.976 rows=11 loops=1)

4. 0.085 1.842 ↓ 11.0 11 1

Hash Right Join (cost=111.33..113.93 rows=1 width=14,248) (actual time=1.770..1.842 rows=11 loops=1)

  • Hash Cond: (quotation."quotationTreeId" = pait.id)
5. 0.013 0.056 ↑ 1.0 20 1

Nested Loop Left Join (cost=0.00..2.51 rows=20 width=4,285) (actual time=0.022..0.056 rows=20 loops=1)

  • Join Filter: ("quotationCreatedBy".id = quotation."createdById")
6. 0.023 0.023 ↑ 1.0 20 1

Seq Scan on quotation (cost=0.00..1.20 rows=20 width=637) (actual time=0.008..0.023 rows=20 loops=1)

7. 0.015 0.020 ↑ 1.0 1 20

Materialize (cost=0.00..1.01 rows=1 width=3,648) (actual time=0.001..0.001 rows=1 loops=20)

8. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on "user" "quotationCreatedBy" (cost=0.00..1.01 rows=1 width=3,648) (actual time=0.004..0.005 rows=1 loops=1)

9. 0.043 1.701 ↓ 11.0 11 1

Hash (cost=111.32..111.32 rows=1 width=9,963) (actual time=1.700..1.701 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
10. 0.053 1.658 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.72..111.32 rows=1 width=9,963) (actual time=1.145..1.658 rows=11 loops=1)

  • Join Filter: ("quotationPart"."quotationTreeId" = pait.id)
  • Rows Removed by Join Filter: 44
11. 0.057 1.572 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.72..110.29 rows=1 width=9,735) (actual time=1.128..1.572 rows=11 loops=1)

  • Join Filter: ("group"."quotationTreeId" = pait.id)
  • Rows Removed by Join Filter: 143
12. 0.055 1.438 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.72..109.09 rows=1 width=9,572) (actual time=1.108..1.438 rows=11 loops=1)

  • Join Filter: (product."quotationTreeId" = pait.id)
  • Rows Removed by Join Filter: 66
13. 0.039 1.350 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.72..107.96 rows=1 width=9,411) (actual time=1.092..1.350 rows=11 loops=1)

14. 0.049 1.289 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.58..106.69 rows=1 width=8,775) (actual time=1.063..1.289 rows=11 loops=1)

  • Join Filter: ("parentItemCategoryLocales"."itemCategoryId" = "parentItemCategory".id)
  • Rows Removed by Join Filter: 61
15. 0.054 1.218 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.58..105.57 rows=1 width=8,725) (actual time=1.050..1.218 rows=11 loops=1)

  • Join Filter: ("parentItemCategory".id = "parentItem"."itemCategoryId")
  • Rows Removed by Join Filter: 52
16. 0.025 1.131 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.58..104.48 rows=1 width=8,579) (actual time=1.037..1.131 rows=11 loops=1)

17. 0.027 1.062 ↓ 11.0 11 1

Nested Loop Left Join (cost=89.29..101.79 rows=1 width=8,500) (actual time=1.014..1.062 rows=11 loops=1)

18. 0.048 1.014 ↓ 7.0 7 1

Hash Right Join (cost=89.16..100.96 rows=1 width=8,496) (actual time=0.990..1.014 rows=7 loops=1)

  • Hash Cond: ("parentItemCurrencyLocales"."currencyId" = "parentItemCurrency".id)
19. 0.004 0.004 ↑ 43.3 3 1

Seq Scan on currency_locale "parentItemCurrencyLocales" (cost=0.00..11.30 rows=130 width=556) (actual time=0.003..0.004 rows=3 loops=1)

20. 0.036 0.962 ↓ 7.0 7 1

Hash (cost=89.15..89.15 rows=1 width=7,940) (actual time=0.962..0.962 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
21. 0.028 0.926 ↓ 7.0 7 1

Nested Loop Left Join (cost=18.65..89.15 rows=1 width=7,940) (actual time=0.358..0.926 rows=7 loops=1)

22. 0.023 0.842 ↓ 7.0 7 1

Nested Loop Left Join (cost=15.39..74.99 rows=1 width=6,773) (actual time=0.328..0.842 rows=7 loops=1)

23. 0.026 0.805 ↓ 7.0 7 1

Nested Loop Left Join (cost=15.24..71.74 rows=1 width=6,641) (actual time=0.312..0.805 rows=7 loops=1)

  • Join Filter: ("parentItemVatLocales"."vatId" = "parentItemVat".id)
24. 0.024 0.772 ↓ 7.0 7 1

Nested Loop Left Join (cost=15.24..60.61 rows=1 width=5,053) (actual time=0.303..0.772 rows=7 loops=1)

25. 0.020 0.699 ↓ 7.0 7 1

Nested Loop Left Join (cost=14.82..55.82 rows=1 width=4,735) (actual time=0.288..0.699 rows=7 loops=1)

26. 0.017 0.658 ↓ 7.0 7 1

Nested Loop Left Join (cost=14.68..54.38 rows=1 width=4,676) (actual time=0.277..0.658 rows=7 loops=1)

27. 0.029 0.620 ↓ 7.0 7 1

Nested Loop Left Join (cost=14.53..53.11 rows=1 width=4,040) (actual time=0.266..0.620 rows=7 loops=1)

  • Join Filter: ("itemCategoryLocales"."itemCategoryId" = "itemCategory".id)
  • Rows Removed by Join Filter: 36
28. 0.033 0.563 ↓ 7.0 7 1

Nested Loop Left Join (cost=14.53..52.00 rows=1 width=3,990) (actual time=0.250..0.563 rows=7 loops=1)

  • Join Filter: ("itemCategory".id = item."itemCategoryId")
  • Rows Removed by Join Filter: 23
29. 0.013 0.502 ↓ 7.0 7 1

Nested Loop Left Join (cost=14.53..50.91 rows=1 width=3,844) (actual time=0.233..0.502 rows=7 loops=1)

30. 0.015 0.433 ↓ 7.0 7 1

Nested Loop Left Join (cost=14.25..48.22 rows=1 width=3,765) (actual time=0.222..0.433 rows=7 loops=1)

31. 0.013 0.388 ↓ 3.0 3 1

Nested Loop Left Join (cost=14.12..47.39 rows=1 width=3,761) (actual time=0.203..0.388 rows=3 loops=1)

32. 0.017 0.312 ↓ 3.0 3 1

Nested Loop Left Join (cost=10.86..33.23 rows=1 width=2,594) (actual time=0.177..0.312 rows=3 loops=1)

33. 0.019 0.238 ↓ 3.0 3 1

Nested Loop Left Join (cost=7.60..19.33 rows=1 width=974) (actual time=0.153..0.238 rows=3 loops=1)

34. 0.022 0.132 ↓ 3.0 3 1

Merge Left Join (cost=4.34..4.43 rows=1 width=286) (actual time=0.117..0.132 rows=3 loops=1)

  • Merge Cond: (pait.id = item."quotationTreeId")
35. 0.016 0.067 ↓ 3.0 3 1

Sort (cost=2.97..2.98 rows=1 width=59) (actual time=0.065..0.067 rows=3 loops=1)

  • Sort Key: pait.id
  • Sort Method: quicksort Memory: 25kB
36. 0.051 0.051 ↓ 3.0 3 1

Seq Scan on quotation_tree pait (cost=0.00..2.96 rows=1 width=59) (actual time=0.018..0.051 rows=3 loops=1)

  • Filter: (("deletedAt" IS NULL) AND (lft >= 1) AND (rgt <= 6) AND ((grp)::text = '80'::text))
  • Rows Removed by Filter: 54
37. 0.026 0.043 ↓ 1.1 14 1

Sort (cost=1.37..1.40 rows=13 width=227) (actual time=0.041..0.043 rows=14 loops=1)

  • Sort Key: item."quotationTreeId
  • Sort Method: quicksort Memory: 28kB
38. 0.017 0.017 ↓ 1.1 14 1

Seq Scan on quotation_item item (cost=0.00..1.13 rows=13 width=227) (actual time=0.009..0.017 rows=14 loops=1)

39. 0.040 0.087 ↑ 1.0 1 3

Hash Right Join (cost=3.25..14.90 rows=1 width=688) (actual time=0.025..0.029 rows=1 loops=3)

  • Hash Cond: ("itemCurrencyLocales"."currencyId" = "itemCurrency".id)
40. 0.008 0.008 ↑ 43.3 3 2

Seq Scan on currency_locale "itemCurrencyLocales" (cost=0.00..11.30 rows=130 width=556) (actual time=0.003..0.004 rows=3 loops=2)

41. 0.012 0.039 ↑ 1.0 1 3

Hash (cost=3.24..3.24 rows=1 width=132) (actual time=0.013..0.013 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
42. 0.027 0.027 ↑ 1.0 1 3

Index Scan using "PK_3cda65c731a6264f0e444cc9b91" on currency "itemCurrency" (cost=0.15..3.24 rows=1 width=132) (actual time=0.009..0.009 rows=1 loops=3)

  • Index Cond: (id = item."currencyId")
43. 0.028 0.057 ↑ 1.0 1 3

Hash Right Join (cost=3.26..13.89 rows=1 width=1,620) (actual time=0.018..0.019 rows=1 loops=3)

  • Hash Cond: ("itemVatLocales"."vatId" = "itemVat".id)
44. 0.002 0.002 ↓ 0.0 0 2

Seq Scan on vat_locale "itemVatLocales" (cost=0.00..10.50 rows=50 width=1,588) (actual time=0.001..0.001 rows=0 loops=2)

45. 0.012 0.027 ↑ 1.0 1 3

Hash (cost=3.25..3.25 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
46. 0.015 0.015 ↑ 1.0 1 3

Index Scan using "PK_78a7504ba84d527a3cb7dd28297" on vat "itemVat" (cost=0.15..3.25 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id = item."vatId")
47. 0.032 0.063 ↑ 1.0 1 3

Hash Right Join (cost=3.26..14.14 rows=1 width=1,167) (actual time=0.019..0.021 rows=1 loops=3)

  • Hash Cond: ("itemUnitTypeLocales"."unitTypeId" = "itemUnitType".id)
48. 0.010 0.010 ↑ 17.5 4 2

Seq Scan on unit_type_locale "itemUnitTypeLocales" (cost=0.00..10.70 rows=70 width=1,130) (actual time=0.004..0.005 rows=4 loops=2)

49. 0.006 0.021 ↑ 1.0 1 3

Hash (cost=3.25..3.25 rows=1 width=37) (actual time=0.007..0.007 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
50. 0.015 0.015 ↑ 1.0 1 3

Index Scan using "PK_e883871bf594e4890e06e7ee27e" on unit_type "itemUnitType" (cost=0.15..3.25 rows=1 width=37) (actual time=0.004..0.005 rows=1 loops=3)

  • Index Cond: (id = item."unitTypeId")
51. 0.030 0.030 ↑ 1.5 2 3

Index Only Scan using "PK_45e6dd7fbb5566b4a6d08658e5e" on quotation_item_attributes_attribite_value "item_itemAttributes" (cost=0.13..0.80 rows=3 width=8) (actual time=0.008..0.010 rows=2 loops=3)

  • Index Cond: ("quotationItemId" = item.id)
  • Heap Fetches: 5
52. 0.015 0.056 ↑ 1.0 1 7

Nested Loop Left Join (cost=0.29..2.69 rows=1 width=83) (actual time=0.007..0.008 rows=1 loops=7)

53. 0.021 0.021 ↑ 1.0 1 7

Index Scan using "PK_b3c44d7aec3433fa921ec72e323" on attribite_value "itemAttributes" (cost=0.14..2.45 rows=1 width=54) (actual time=0.003..0.003 rows=1 loops=7)

  • Index Cond: (id = "item_itemAttributes"."attribiteValueId")
54. 0.020 0.020 ↑ 1.0 1 5

Index Scan using "PK_b01a399aef5e6a4d4aabe4a6e83" on attribite_field "itemAttributesField" (cost=0.14..0.23 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=5)

  • Index Cond: (id = "itemAttributes"."fieldId")
55. 0.028 0.028 ↑ 1.0 4 7

Seq Scan on item_category "itemCategory" (cost=0.00..1.04 rows=4 width=146) (actual time=0.003..0.004 rows=4 loops=7)

56. 0.028 0.028 ↓ 1.2 6 7

Seq Scan on item_category_locale "itemCategoryLocales" (cost=0.00..1.05 rows=5 width=50) (actual time=0.003..0.004 rows=6 loops=7)

57. 0.021 0.021 ↑ 1.0 1 7

Index Scan using "PK_ed133b6c81724af85a3af6ed919" on attribite_rule "itemAttributesFieldRule" (cost=0.14..1.25 rows=1 width=636) (actual time=0.003..0.003 rows=1 loops=7)

  • Index Cond: (id = "itemAttributesField"."ruleId")
58. 0.021 0.021 ↑ 1.0 1 7

Index Scan using "PK_9355a72837e164ab845e5a7d7af" on quotation_tree "itemQuotationTree" (cost=0.14..1.39 rows=1 width=59) (actual time=0.003..0.003 rows=1 loops=7)

  • Index Cond: (id = item."quotationTreeId")
59. 0.007 0.049 ↓ 0.0 0 7

Nested Loop Left Join (cost=0.43..4.79 rows=1 width=318) (actual time=0.007..0.007 rows=0 loops=7)

60. 0.021 0.021 ↓ 0.0 0 7

Index Scan using "PK_9355a72837e164ab845e5a7d7af" on quotation_tree parent (cost=0.14..0.45 rows=1 width=59) (actual time=0.003..0.003 rows=0 loops=7)

  • Index Cond: (id = "itemQuotationTree"."parentId")
  • Filter: (("outerType")::text = 'item'::text)
  • Rows Removed by Filter: 1
61. 0.003 0.021 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.29..4.33 rows=1 width=259) (actual time=0.020..0.021 rows=1 loops=1)

62. 0.012 0.012 ↑ 1.0 1 1

Index Scan using "UQ_07c9e6dfb6b56bb671757be3a4c" on quotation_item "parentItem" (cost=0.14..1.08 rows=1 width=227) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: ("quotationTreeId" = parent.id)
63. 0.006 0.006 ↑ 1.0 1 1

Index Scan using "PK_78a7504ba84d527a3cb7dd28297" on vat "parentItemVat" (cost=0.15..3.25 rows=1 width=32) (actual time=0.005..0.006 rows=1 loops=1)

  • Index Cond: (id = "parentItem"."vatId")
64. 0.007 0.007 ↓ 0.0 0 7

Seq Scan on vat_locale "parentItemVatLocales" (cost=0.00..10.50 rows=50 width=1,588) (actual time=0.001..0.001 rows=0 loops=7)

65. 0.014 0.014 ↓ 0.0 0 7

Index Scan using "PK_3cda65c731a6264f0e444cc9b91" on currency "parentItemCurrency" (cost=0.15..3.24 rows=1 width=132) (actual time=0.002..0.002 rows=0 loops=7)

  • Index Cond: (id = "parentItem"."currencyId")
66. 0.030 0.056 ↓ 0.0 0 7

Hash Right Join (cost=3.26..14.14 rows=1 width=1,167) (actual time=0.008..0.008 rows=0 loops=7)

  • Hash Cond: ("parentItemUnitTypeLocales"."unitTypeId" = "parentItemUnitType".id)
67. 0.005 0.005 ↑ 17.5 4 1

Seq Scan on unit_type_locale "parentItemUnitTypeLocales" (cost=0.00..10.70 rows=70 width=1,130) (actual time=0.005..0.005 rows=4 loops=1)

68. 0.014 0.021 ↓ 0.0 0 7

Hash (cost=3.25..3.25 rows=1 width=37) (actual time=0.002..0.003 rows=0 loops=7)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
69. 0.007 0.007 ↓ 0.0 0 7

Index Scan using "PK_e883871bf594e4890e06e7ee27e" on unit_type "parentItemUnitType" (cost=0.15..3.25 rows=1 width=37) (actual time=0.001..0.001 rows=0 loops=7)

  • Index Cond: (id = "parentItem"."unitTypeId")
70. 0.021 0.021 ↑ 3.0 1 7

Index Only Scan using "PK_45e6dd7fbb5566b4a6d08658e5e" on quotation_item_attributes_attribite_value "parentItem_parentItemAttributes" (cost=0.13..0.80 rows=3 width=8) (actual time=0.002..0.003 rows=1 loops=7)

  • Index Cond: ("quotationItemId" = "parentItem".id)
  • Heap Fetches: 5
71. 0.018 0.044 ↓ 0.0 0 11

Nested Loop Left Join (cost=0.29..2.69 rows=1 width=83) (actual time=0.004..0.004 rows=0 loops=11)

72. 0.011 0.011 ↓ 0.0 0 11

Index Scan using "PK_b3c44d7aec3433fa921ec72e323" on attribite_value "parentItemAttributes" (cost=0.14..2.45 rows=1 width=54) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (id = "parentItem_parentItemAttributes"."attribiteValueId")
73. 0.015 0.015 ↑ 1.0 1 5

Index Scan using "PK_b01a399aef5e6a4d4aabe4a6e83" on attribite_field "parentItemAttributesField" (cost=0.14..0.23 rows=1 width=29) (actual time=0.003..0.003 rows=1 loops=5)

  • Index Cond: (id = "parentItemAttributes"."fieldId")
74. 0.033 0.033 ↓ 1.2 5 11

Seq Scan on item_category "parentItemCategory" (cost=0.00..1.04 rows=4 width=146) (actual time=0.002..0.003 rows=5 loops=11)

75. 0.022 0.022 ↓ 1.2 6 11

Seq Scan on item_category_locale "parentItemCategoryLocales" (cost=0.00..1.05 rows=5 width=50) (actual time=0.002..0.002 rows=6 loops=11)

76. 0.022 0.022 ↓ 0.0 0 11

Index Scan using "PK_ed133b6c81724af85a3af6ed919" on attribite_rule "parentItemAttributesFieldRule" (cost=0.14..1.25 rows=1 width=636) (actual time=0.002..0.002 rows=0 loops=11)

  • Index Cond: (id = "parentItemAttributesField"."ruleId")
77. 0.033 0.033 ↑ 1.0 6 11

Seq Scan on quotation_product product (cost=0.00..1.06 rows=6 width=161) (actual time=0.001..0.003 rows=6 loops=11)

78. 0.077 0.077 ↓ 1.4 13 11

Seq Scan on quotation_group "group" (cost=0.00..1.09 rows=9 width=163) (actual time=0.003..0.007 rows=13 loops=11)

79. 0.033 0.033 ↓ 4.0 4 11

Seq Scan on quotation_part "quotationPart" (cost=0.00..1.01 rows=1 width=228) (actual time=0.002..0.003 rows=4 loops=11)

80. 0.051 0.077 ↓ 0.0 0 11

Hash Right Join (cost=2.58..14.22 rows=1 width=688) (actual time=0.006..0.007 rows=0 loops=11)

  • Hash Cond: ("quotationCurrencyLocales"."currencyId" = "quotationCurrency".id)
81. 0.004 0.004 ↑ 43.3 3 1

Seq Scan on currency_locale "quotationCurrencyLocales" (cost=0.00..11.30 rows=130 width=556) (actual time=0.003..0.004 rows=3 loops=1)

82. 0.011 0.022 ↓ 0.0 0 11

Hash (cost=2.56..2.56 rows=1 width=132) (actual time=0.002..0.002 rows=0 loops=11)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
83. 0.011 0.011 ↓ 0.0 0 11

Index Scan using "PK_3cda65c731a6264f0e444cc9b91" on currency "quotationCurrency" (cost=0.15..2.56 rows=1 width=132) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (id = quotation."currencyId")
84. 0.033 0.055 ↓ 0.0 0 11

Hash Right Join (cost=4.69..15.71 rows=11 width=1,596) (actual time=0.005..0.005 rows=0 loops=11)

  • Hash Cond: ("quotationTagsLocales"."parentId" = "quotationTags".id)
85. 0.000 0.000 ↓ 0.0 0

Seq Scan on tag_locale "quotationTagsLocales" (cost=0.00..10.70 rows=70 width=1,052) (never executed)

86. 0.011 0.022 ↓ 0.0 0 11

Hash (cost=4.55..4.55 rows=11 width=544) (actual time=0.002..0.002 rows=0 loops=11)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
87. 0.000 0.011 ↓ 0.0 0 11

Nested Loop Left Join (cost=0.30..4.55 rows=11 width=544) (actual time=0.001..0.001 rows=0 loops=11)

88. 0.011 0.011 ↓ 0.0 0 11

Index Scan using "IDX_369f835706d232817243778d18" on quotation_tags_tag "quotation_quotationTags" (cost=0.15..2.55 rows=11 width=8) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: ("quotationId" = quotation.id)
89. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_8e4052373c579afc1471f526760" on tag "quotationTags" (cost=0.14..0.18 rows=1 width=540) (never executed)

  • Index Cond: (id = "quotation_quotationTags"."tagId")