explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LPxE

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 3.731 ↑ 1.0 11 1

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

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

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

3. 0.084 3.560 ↓ 11.0 11 1

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

4. 0.126 3.388 ↓ 11.0 11 1

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

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

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

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

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

7. 0.005 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.015 0.015 ↑ 1.0 1 1

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

9. 0.091 3.155 ↓ 11.0 11 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
10. 0.096 3.064 ↓ 11.0 11 1

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

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

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

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

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

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

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

14. 0.098 2.381 ↓ 11.0 11 1

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

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

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

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

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

17. 0.062 1.886 ↓ 11.0 11 1

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

18. 0.089 1.789 ↓ 7.0 7 1

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

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

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

20. 0.057 1.689 ↓ 7.0 7 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
21. 0.067 1.632 ↓ 7.0 7 1

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

22. 0.062 1.474 ↓ 7.0 7 1

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

23. 0.050 1.398 ↓ 7.0 7 1

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

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

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

25. 0.046 1.197 ↓ 7.0 7 1

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

26. 0.051 1.116 ↓ 7.0 7 1

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

27. 0.058 1.037 ↓ 7.0 7 1

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

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

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

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

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

30. 0.037 0.657 ↓ 7.0 7 1

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

31. 0.031 0.590 ↓ 3.0 3 1

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

32. 0.031 0.457 ↓ 3.0 3 1

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

33. 0.038 0.354 ↓ 3.0 3 1

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

34. 0.042 0.187 ↓ 3.0 3 1

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

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

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

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

Seq Scan on quotation_tree pait (cost=0.00..2.96 rows=1 width=59) (actual time=0.030..0.065 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.028 0.067 ↓ 1.1 14 1

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

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

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

39. 0.061 0.129 ↑ 1.0 1 3

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

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

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

41. 0.015 0.054 ↑ 1.0 1 3

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

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

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

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

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

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

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

45. 0.012 0.033 ↑ 1.0 1 3

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

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

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

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

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

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

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

49. 0.012 0.039 ↑ 1.0 1 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
50. 0.027 0.027 ↑ 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.009..0.009 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.007..0.010 rows=2 loops=3)

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

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

53. 0.042 0.042 ↑ 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.005..0.006 rows=1 loops=7)

  • Index Cond: (id = "item_itemAttributes"."attribiteValueId")
54. 0.030 0.030 ↑ 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.006..0.006 rows=1 loops=5)

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

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

56. 0.049 0.049 ↓ 1.2 6 7

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

57. 0.028 0.028 ↑ 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.004..0.004 rows=1 loops=7)

  • Index Cond: (id = "itemAttributesField"."ruleId")
58. 0.035 0.035 ↑ 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.005..0.005 rows=1 loops=7)

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

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

60. 0.035 0.035 ↓ 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.005..0.005 rows=0 loops=7)

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

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

62. 0.023 0.023 ↑ 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.021..0.023 rows=1 loops=1)

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

Index Scan using "PK_78a7504ba84d527a3cb7dd28297" on vat "parentItemVat" (cost=0.15..3.25 rows=1 width=32) (actual time=0.007..0.007 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.050 0.091 ↓ 0.0 0 7

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

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

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

68. 0.014 0.028 ↓ 0.0 0 7

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
69. 0.014 0.014 ↓ 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.002..0.002 rows=0 loops=7)

  • Index Cond: (id = "parentItem"."unitTypeId")
70. 0.035 0.035 ↑ 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.003..0.005 rows=1 loops=7)

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

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

72. 0.044 0.044 ↓ 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.003..0.004 rows=0 loops=11)

  • Index Cond: (id = "parentItem_parentItemAttributes"."attribiteValueId")
73. 0.035 0.035 ↑ 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.007..0.007 rows=1 loops=5)

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

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

75. 0.055 0.055 ↓ 1.2 6 11

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

76. 0.033 0.033 ↓ 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.003..0.003 rows=0 loops=11)

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

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

78. 0.143 0.143 ↓ 1.4 13 11

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

79. 0.088 0.088 ↓ 4.0 4 11

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

80. 0.049 0.088 ↓ 0.0 0 11

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

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

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

82. 0.011 0.033 ↓ 0.0 0 11

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

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

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

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

Hash Right Join (cost=4.69..15.71 rows=11 width=1,596) (actual time=0.004..0.004 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")