explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9VWD

Settings
# exclusive inclusive rows x rows loops node
1. 5.814 595.795 ↓ 43.6 698 1

Sort (cost=10,000,041,189.64..10,000,041,189.68 rows=16 width=5,801) (actual time=595.730..595.795 rows=698 loops=1)

  • Output: supplier_order_full.id, supplier_order_full.umpteenth, supplier_order_full."dateValidated", supplier_order_full."timeValidated", supplier_order_full."dateDelivery", supplier_order_full."sendingMode", supplier_order_full.status, supplier_order_ful (...)
  • Sort Key: supplier_order_full."dateUpdated", supplier_order_full.id, supplier_order_full."idSiteOwner", supplier_order_full."idSiteDelivered", supplier_order_full."_labelProduct", supplier_order_full."idOrderSupplierProduct
  • Sort Method: quicksort Memory: 733kB
  • Buffers: shared hit=28,888 read=233
2.          

CTE sites

3. 0.760 2.572 ↓ 21.1 1,771 1

HashAggregate (cost=10,000,000,387.99..10,000,000,388.83 rows=84 width=10) (actual time=2.309..2.572 rows=1,771 loops=1)

  • Output: wished_site_parent_tree."idSite", wished_site_parent_tree."idSiteParent", wished_site_parent_tree."idTree
  • Group Key: wished_site_parent_tree."idSite", wished_site_parent_tree."idSiteParent", wished_site_parent_tree."idTree
  • Buffers: shared hit=141
4. 0.133 1.812 ↓ 21.1 1,771 1

Append (cost=105.98..10,000,000,387.36 rows=84 width=10) (actual time=0.855..1.812 rows=1,771 loops=1)

  • Buffers: shared hit=141
5. 0.192 1.365 ↓ 35.4 1,771 1

Nested Loop (cost=105.98..148.69 rows=50 width=10) (actual time=0.854..1.365 rows=1,771 loops=1)

  • Output: wished_site_parent_tree."idSite", wished_site_parent_tree."idSiteParent", wished_site_parent_tree."idTree
  • Buffers: shared hit=50
6. 0.002 0.755 ↑ 1.0 1 1

Limit (cost=82.80..82.81 rows=1 width=16) (actual time=0.755..0.755 rows=1 loops=1)

  • Output: NULL::integer, "Site_Parent_Tree"."leftBorder", "Site_Parent_Tree"."rightBorder", "Site_Parent_Tree".depth, "Site_Parent_Tree"."idTree
  • Buffers: shared hit=27
7. 0.007 0.753 ↑ 2.0 1 1

Sort (cost=82.80..82.81 rows=2 width=16) (actual time=0.753..0.753 rows=1 loops=1)

  • Output: NULL::integer, "Site_Parent_Tree"."leftBorder", "Site_Parent_Tree"."rightBorder", "Site_Parent_Tree".depth, "Site_Parent_Tree"."idTree
  • Sort Key: "Site_Parent_Tree"."idTree
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=27
8. 0.407 0.746 ↑ 1.0 2 1

Hash Join (cost=8.31..82.79 rows=2 width=16) (actual time=0.624..0.746 rows=2 loops=1)

  • Output: NULL::integer, "Site_Parent_Tree"."leftBorder", "Site_Parent_Tree"."rightBorder", "Site_Parent_Tree".depth, "Site_Parent_Tree"."idTree
  • Hash Cond: ("Site_Parent_Tree"."idSite" = "Right"."idSite")
  • Buffers: shared hit=27
9. 0.325 0.325 ↑ 1.0 3,670 1

Seq Scan on public."Site_Parent_Tree" (cost=0.00..60.70 rows=3,670 width=16) (actual time=0.009..0.325 rows=3,670 loops=1)

  • Output: "Site_Parent_Tree"."idTree", "Site_Parent_Tree"."idSite", "Site_Parent_Tree"."idSiteParent", "Site_Parent_Tree"."leftBorder", "Site_Parent_Tree"."rightBorder", "Site_Parent_Tree".depth
  • Buffers: shared hit=24
10. 0.002 0.014 ↑ 1.0 1 1

Hash (cost=8.30..8.30 rows=1 width=4) (actual time=0.014..0.014 rows=1 loops=1)

  • Output: "Right"."idSite
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
11. 0.012 0.012 ↑ 1.0 1 1

Index Scan using "Right_PK" on public."Right" (cost=0.28..8.30 rows=1 width=4) (actual time=0.011..0.012 rows=1 loops=1)

  • Output: "Right"."idSite
  • Index Cond: ("Right"."idUser" = 1)
  • Buffers: shared hit=3
12. 0.339 0.418 ↓ 52.1 1,771 1

Bitmap Heap Scan on public."Site_Parent_Tree" wished_site_parent_tree (cost=23.17..65.53 rows=34 width=20) (actual time=0.091..0.418 rows=1,771 loops=1)

  • Output: wished_site_parent_tree."idTree", wished_site_parent_tree."idSite", wished_site_parent_tree."idSiteParent", wished_site_parent_tree."leftBorder", wished_site_parent_tree."rightBorder", wished_site_parent_tree.depth
  • Recheck Cond: (wished_site_parent_tree."idTree" = "Site_Parent_Tree"."idTree")
  • Filter: ((wished_site_parent_tree."leftBorder" >= "Site_Parent_Tree"."leftBorder") AND (wished_site_parent_tree."rightBorder" <= "Site_Parent_Tree"."rightBorder") AND (wished_site_parent_tree.depth >= "Site_Parent_Tree".depth))
  • Heap Blocks: exact=15
  • Buffers: shared hit=23
13. 0.079 0.079 ↓ 1.9 1,771 1

Bitmap Index Scan on "Site_Parent_Tree_PK" (cost=0.00..23.16 rows=918 width=0) (actual time=0.079..0.079 rows=1,771 loops=1)

  • Index Cond: (wished_site_parent_tree."idTree" = "Site_Parent_Tree"."idTree")
  • Buffers: shared hit=8
14. 0.005 0.314 ↓ 0.0 0 1

Hash Join (cost=10,000,000,113.17..10,000,000,237.41 rows=34 width=10) (actual time=0.314..0.314 rows=0 loops=1)

  • Output: wished_site_parent_tree_1."idSite", wished_site_parent_tree_1."idSiteParent", wished_site_parent_tree_1."idTree
  • Inner Unique: true
  • Hash Cond: (wished_site_parent_tree_1."idSite" = "Site".id)
  • Buffers: shared hit=91
15. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=10,000,000,000.57..10,000,000,115.15 rows=3,670 width=10) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: wished_site_parent_tree_1."idSite", wished_site_parent_tree_1."idSiteParent", wished_site_parent_tree_1."idTree
  • Buffers: shared hit=5
16. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.57..17.75 rows=1 width=0) (actual time=0.014..0.014 rows=0 loops=1)

  • Inner Unique: true
  • Buffers: shared hit=5
17. 0.008 0.008 ↑ 1.0 1 1

Index Scan using "Right_PK" on public."Right" "Right_1" (cost=0.28..8.30 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Output: "Right_1"."idUser", "Right_1"."idSite", "Right_1"."idProfile
  • Index Cond: ("Right_1"."idUser" = 1)
  • Buffers: shared hit=3
18. 0.005 0.005 ↓ 0.0 0 1

Index Only Scan using "Profile_Action_PK" on public."Profile_Action" (cost=0.29..8.31 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=1)

  • Output: "Profile_Action"."idProfile", "Profile_Action"."idAction
  • Index Cond: (("Profile_Action"."idProfile" = "Right_1"."idProfile") AND ("Profile_Action"."idAction" = '132752970683'::bigint))
  • Heap Fetches: 0
  • Buffers: shared hit=2
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on public."Site_Parent_Tree" wished_site_parent_tree_1 (cost=0.00..60.70 rows=3,670 width=10) (never executed)

  • Output: wished_site_parent_tree_1."idTree", wished_site_parent_tree_1."idSite", wished_site_parent_tree_1."idSiteParent", wished_site_parent_tree_1."leftBorder", wished_site_parent_tree_1."rightBorder", wished_site_parent_ (...)
20. 0.023 0.294 ↑ 1.0 178 1

Hash (cost=110.38..110.38 rows=178 width=4) (actual time=0.294..0.294 rows=178 loops=1)

  • Output: "Site".id
  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=86
21. 0.271 0.271 ↑ 1.0 178 1

Seq Scan on public."Site" (cost=0.00..110.38 rows=178 width=4) (actual time=0.007..0.271 rows=178 loops=1)

  • Output: "Site".id
  • Filter: ("Site".type = 2)
  • Rows Removed by Filter: 1,772
  • Buffers: shared hit=86
22.          

CTE select_supplier_order

23. 0.008 521.006 ↑ 1.0 100 1

Limit (cost=30,735.13..30,735.38 rows=100 width=80) (actual time=520.993..521.006 rows=100 loops=1)

  • Output: "OrderSupplier".id, "OrderSupplier".umpteenth, "OrderSupplier"."dateCreated", "OrderSupplier"."dateUpdated", "OrderSupplier"."dateSent", "OrderSupplier"."dateDelivery", "OrderSupplier".status, "OrderSupplier"."sendingMode", "OrderSupplier (...)
  • Buffers: shared hit=13,794
24. 167.720 520.998 ↑ 670.0 100 1

Sort (cost=30,735.13..30,902.63 rows=67,000 width=80) (actual time=520.991..520.998 rows=100 loops=1)

  • Output: "OrderSupplier".id, "OrderSupplier".umpteenth, "OrderSupplier"."dateCreated", "OrderSupplier"."dateUpdated", "OrderSupplier"."dateSent", "OrderSupplier"."dateDelivery", "OrderSupplier".status, "OrderSupplier"."sendingMode", "OrderSu (...)
  • Sort Key: "OrderSupplier"."dateUpdated
  • Sort Method: top-N heapsort Memory: 52kB
  • Buffers: shared hit=13,794
25. 203.617 353.278 ↓ 11.0 738,598 1

Hash Join (cost=2.73..28,174.44 rows=67,000 width=80) (actual time=3.260..353.278 rows=738,598 loops=1)

  • Output: "OrderSupplier".id, "OrderSupplier".umpteenth, "OrderSupplier"."dateCreated", "OrderSupplier"."dateUpdated", "OrderSupplier"."dateSent", "OrderSupplier"."dateDelivery", "OrderSupplier".status, "OrderSupplier"."sendingMode", "O (...)
  • Hash Cond: ("OrderSupplier"."idSiteOwner" = sites."idSite")
  • Buffers: shared hit=13,794
26. 146.416 146.416 ↑ 1.0 738,598 1

Seq Scan on public."OrderSupplier" (cost=0.00..24,731.97 rows=738,598 width=80) (actual time=0.010..146.416 rows=738,598 loops=1)

  • Output: "OrderSupplier".id, "OrderSupplier"."dateDelivery", "OrderSupplier"."dateSent", "OrderSupplier"."dateCreated", "OrderSupplier"."dateUpdated", "OrderSupplier".status, "OrderSupplier"."idSiteOwner", "OrderSupplier"."idSite (...)
  • Filter: ("OrderSupplier"."dateUpdated" > ('2013-01-01 12:00:00+01'::timestamp with time zone)::timestamp without time zone)
  • Buffers: shared hit=13,653
27. 0.242 3.245 ↓ 21.1 1,771 1

Hash (cost=1.68..1.68 rows=84 width=4) (actual time=3.245..3.245 rows=1,771 loops=1)

  • Output: sites."idSite
  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 79kB
  • Buffers: shared hit=141
28. 3.003 3.003 ↓ 21.1 1,771 1

CTE Scan on sites (cost=0.00..1.68 rows=84 width=4) (actual time=2.311..3.003 rows=1,771 loops=1)

  • Output: sites."idSite
  • Buffers: shared hit=141
29.          

CTE select_products

30. 14.890 568.929 ↑ 2.2 1,441 1

Hash Join (cost=215.89..9,536.64 rows=3,126 width=335) (actual time=523.296..568.929 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "SupplierProduct".id, "SupplierProduct".label, simplify_str(("SupplierProduct".label)::text), "SupplierProduct".reference, "SupplierProduct"."codeInternal", "SupplierProduct"."extId", (...)
  • Inner Unique: true
  • Hash Cond: ("ProdFamily"."idProdFamilyParent" = parentprodfamily.id)
  • Buffers: shared hit=24,572 read=227
31. 0.431 553.897 ↑ 2.2 1,441 1

Hash Join (cost=205.35..8,705.01 rows=3,126 width=184) (actual time=523.050..553.897 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "OrderSupplier_Product".comment, "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product"."_priceBillingUnitSupplier", "OrderSupplier_Product"."qtyOrderUnit", "Suppli (...)
  • Inner Unique: true
  • Hash Cond: ("Product"."idProdFamily" = "ProdFamily".id)
  • Buffers: shared hit=24,568 read=227
32. 0.448 553.345 ↑ 2.2 1,441 1

Hash Join (cost=194.80..8,686.13 rows=3,126 width=146) (actual time=522.924..553.345 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "OrderSupplier_Product".comment, "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product"."_priceBillingUnitSupplier", "OrderSupplier_Product"."qtyOrderUnit", " (...)
  • Inner Unique: true
  • Hash Cond: ("SupplierProduct"."idOrderUnit" = order_unit.id)
  • Buffers: shared hit=24,564 read=227
33. 0.488 551.679 ↑ 2.2 1,441 1

Hash Join (cost=97.97..8,581.09 rows=3,126 width=133) (actual time=521.699..551.679 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "OrderSupplier_Product".comment, "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product"."_priceBillingUnitSupplier", "OrderSupplier_Product"."qtyOrderUn (...)
  • Inner Unique: true
  • Hash Cond: ("SupplierProduct"."idBillingUnit" = billing_unit.id)
  • Buffers: shared hit=24,538 read=227
34. 0.237 550.523 ↑ 2.2 1,441 1

Nested Loop (cost=1.14..8,476.04 rows=3,126 width=120) (actual time=521.023..550.523 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "OrderSupplier_Product".comment, "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product"."_priceBillingUnitSupplier", "OrderSupplier_Product"."qtyO (...)
  • Inner Unique: true
  • Buffers: shared hit=24,512 read=227
35. 0.842 544.522 ↑ 2.2 1,441 1

Nested Loop (cost=0.85..7,446.05 rows=3,126 width=121) (actual time=521.017..544.522 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "OrderSupplier_Product".comment, "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product"."_priceBillingUnitSupplier", "OrderSupplier_Product" (...)
  • Inner Unique: true
  • Buffers: shared hit=20,230 read=186
36. 0.350 522.065 ↑ 2.2 1,441 1

Nested Loop (cost=0.43..6,077.67 rows=3,126 width=31) (actual time=521.009..522.065 rows=1,441 loops=1)

  • Output: select_supplier_order.id, "OrderSupplier_Product".id, "OrderSupplier_Product".comment, "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product"."_priceBillingUnitSupplier", "OrderSupplier_Pr (...)
  • Buffers: shared hit=14,647 read=5
37. 521.015 521.015 ↑ 1.0 100 1

CTE Scan on select_supplier_order (cost=0.00..2.00 rows=100 width=4) (actual time=520.995..521.015 rows=100 loops=1)

  • Output: select_supplier_order.id, select_supplier_order.umpteenth, select_supplier_order."dateCreated", select_supplier_order."dateUpdated", select_supplier_order."dateSent", select_supplier_order."dateDe (...)
  • Buffers: shared hit=13,794
38. 0.700 0.700 ↑ 2.2 14 100

Index Scan using "OrderSupplier_Product_UK" on public."OrderSupplier_Product" (cost=0.43..60.45 rows=31 width=31) (actual time=0.003..0.007 rows=14 loops=100)

  • Output: "OrderSupplier_Product"."idOrderSupplier", "OrderSupplier_Product"."idSupplierProduct", "OrderSupplier_Product"."qtyOrderUnit", "OrderSupplier_Product"."_priceBillingUnit", "OrderSupplier_Product" (...)
  • Index Cond: ("OrderSupplier_Product"."idOrderSupplier" = select_supplier_order.id)
  • Buffers: shared hit=853 read=5
39. 21.615 21.615 ↑ 1.0 1 1,441

Index Scan using "SupplierProduct_PK" on public."SupplierProduct" (cost=0.42..0.44 rows=1 width=94) (actual time=0.015..0.015 rows=1 loops=1,441)

  • Output: "SupplierProduct".id, "SupplierProduct"."idProduct", "SupplierProduct"."idSiteOwner", "SupplierProduct".reference, "SupplierProduct".label, "SupplierProduct"."codeInternal", "SupplierProduct"."nbProduct (...)
  • Index Cond: ("SupplierProduct".id = "OrderSupplier_Product"."idSupplierProduct")
  • Buffers: shared hit=5,583 read=181
40. 5.764 5.764 ↑ 1.0 1 1,441

Index Scan using "Product_PK" on public."Product" (cost=0.29..0.33 rows=1 width=7) (actual time=0.004..0.004 rows=1 loops=1,441)

  • Output: "Product".ean13, "Product"."idElement", "Product"."idProdFamily
  • Index Cond: ("Product"."idElement" = "SupplierProduct"."idProduct")
  • Buffers: shared hit=4,282 read=41
41. 0.370 0.668 ↑ 1.0 3,148 1

Hash (cost=57.48..57.48 rows=3,148 width=21) (actual time=0.668..0.668 rows=3,148 loops=1)

  • Output: billing_unit.label, billing_unit.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 200kB
  • Buffers: shared hit=26
42. 0.298 0.298 ↑ 1.0 3,148 1

Seq Scan on public."Unit" billing_unit (cost=0.00..57.48 rows=3,148 width=21) (actual time=0.007..0.298 rows=3,148 loops=1)

  • Output: billing_unit.label, billing_unit.id
  • Buffers: shared hit=26
43. 0.671 1.218 ↑ 1.0 3,148 1

Hash (cost=57.48..57.48 rows=3,148 width=21) (actual time=1.218..1.218 rows=3,148 loops=1)

  • Output: order_unit.label, order_unit.id
  • Buckets: 4,096 Batches: 1 Memory Usage: 200kB
  • Buffers: shared hit=26
44. 0.547 0.547 ↑ 1.0 3,148 1

Seq Scan on public."Unit" order_unit (cost=0.00..57.48 rows=3,148 width=21) (actual time=0.009..0.547 rows=3,148 loops=1)

  • Output: order_unit.label, order_unit.id
  • Buffers: shared hit=26
45. 0.071 0.121 ↑ 1.0 291 1

Hash (cost=6.91..6.91 rows=291 width=40) (actual time=0.121..0.121 rows=291 loops=1)

  • Output: "ProdFamily".id, "ProdFamily".label, "ProdFamily"."extId", "ProdFamily"."idProdFamilyParent
  • Buckets: 1,024 Batches: 1 Memory Usage: 29kB
  • Buffers: shared hit=4
46. 0.050 0.050 ↑ 1.0 291 1

Seq Scan on public."ProdFamily" (cost=0.00..6.91 rows=291 width=40) (actual time=0.004..0.050 rows=291 loops=1)

  • Output: "ProdFamily".id, "ProdFamily".label, "ProdFamily"."extId", "ProdFamily"."idProdFamilyParent
  • Buffers: shared hit=4
47. 0.071 0.142 ↑ 1.0 291 1

Hash (cost=6.91..6.91 rows=291 width=38) (actual time=0.142..0.142 rows=291 loops=1)

  • Output: parentprodfamily.id, parentprodfamily.label, parentprodfamily."extId
  • Buckets: 1,024 Batches: 1 Memory Usage: 29kB
  • Buffers: shared hit=4
48. 0.071 0.071 ↑ 1.0 291 1

Seq Scan on public."ProdFamily" parentprodfamily (cost=0.00..6.91 rows=291 width=38) (actual time=0.017..0.071 rows=291 loops=1)

  • Output: parentprodfamily.id, parentprodfamily.label, parentprodfamily."extId
  • Buffers: shared hit=4
49.          

CTE select_supplier_order_infos

50. 0.467 15.288 ↓ 41.0 41 1

Nested Loop (cost=4.92..452.95 rows=1 width=1,080) (actual time=10.361..15.288 rows=41 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, to_char(select_supplier_order_1."dateSent", 'YYYYMMDD'::text), to_char(select_supplier_order_1."dateSent", 'HH24:MI:SS'::text), to_char((select_supplier_order_1."dateDelivery" (...)
  • Inner Unique: true
  • Buffers: shared hit=4,316 read=6
51. 0.043 14.780 ↓ 41.0 41 1

Nested Loop (cost=4.64..449.19 rows=1 width=956) (actual time=10.306..14.780 rows=41 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_order_1.status, select_supplier_order_ (...)
  • Inner Unique: true
  • Buffers: shared hit=4,193 read=6
52. 0.025 14.696 ↓ 41.0 41 1

Nested Loop (cost=4.36..445.93 rows=1 width=916) (actual time=10.289..14.696 rows=41 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_order_1.status, select_supplier_ (...)
  • Inner Unique: true
  • Buffers: shared hit=4,070 read=6
53. 0.029 6.307 ↓ 41.0 41 1

Nested Loop (cost=4.08..442.67 rows=1 width=879) (actual time=2.207..6.307 rows=41 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_order_1.status, select_sup (...)
  • Inner Unique: true
  • Buffers: shared hit=3,949 read=4
54. 0.012 6.237 ↓ 41.0 41 1

Nested Loop (cost=3.80..442.14 rows=1 width=843) (actual time=2.201..6.237 rows=41 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_order_1.status, sele (...)
  • Inner Unique: true
  • Join Filter: (select_supplier_order_1."idSupplier" = "Supplier".id)
  • Buffers: shared hit=3,826 read=4
55. 0.605 6.102 ↓ 41.0 41 1

Nested Loop (cost=3.53..441.83 rows=1 width=807) (actual time=2.189..6.102 rows=41 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_order_1.status (...)
  • Join Filter: (("Supplier_Site"."dateValid" @> select_supplier_order_1."dateDelivery") AND (select_supplier_order_1."idSupplier" = "Supplier_Site"."idSupplier") AND (select_supplier_order_1."idSiteOwner" = "Supplier_S (...)
  • Rows Removed by Join Filter: 4,440
  • Buffers: shared hit=3,705 read=2
56. 0.217 0.497 ↑ 1.0 100 1

Hash Join (cost=3.25..117.06 rows=100 width=803) (actual time=0.096..0.497 rows=100 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_order_1. (...)
  • Hash Cond: (site_owner.id = select_supplier_order_1."idSiteOwner")
  • Buffers: shared hit=86
57. 0.212 0.212 ↑ 1.0 1,950 1

Seq Scan on public."Site" site_owner (cost=0.00..105.50 rows=1,950 width=44) (actual time=0.004..0.212 rows=1,950 loops=1)

  • Output: site_owner.id, site_owner.label, site_owner.type, site_owner.status, site_owner.link, site_owner."codeInternal", site_owner."isPaymentActive", site_owner."extId", site_owner."idClient", site_owner (...)
  • Buffers: shared hit=86
58. 0.029 0.068 ↑ 1.0 100 1

Hash (cost=2.00..2.00 rows=100 width=759) (actual time=0.068..0.068 rows=100 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_supplier_or (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
59. 0.039 0.039 ↑ 1.0 100 1

CTE Scan on select_supplier_order select_supplier_order_1 (cost=0.00..2.00 rows=100 width=759) (actual time=0.001..0.039 rows=100 loops=1)

  • Output: select_supplier_order_1.id, select_supplier_order_1.umpteenth, select_supplier_order_1."dateSent", select_supplier_order_1."dateDelivery", select_supplier_order_1."sendingMode", select_suppl (...)
60. 5.000 5.000 ↓ 1.5 45 100

Index Scan using "Supplier_Site_UK" on public."Supplier_Site" (cost=0.28..2.71 rows=31 width=19) (actual time=0.016..0.050 rows=45 loops=100)

  • Output: "Supplier_Site"."idSite", "Supplier_Site"."idSupplier", "Supplier_Site"."refSiteOfSupplier", "Supplier_Site"."dateValid", "Supplier_Site"."dateUpdated", "Supplier_Site"."dateCreated", "Supplier_Site"."d (...)
  • Index Cond: ("Supplier_Site"."idSite" = site_owner.id)
  • Buffers: shared hit=3,619 read=2
61. 0.123 0.123 ↑ 1.0 1 41

Index Scan using "Supplier_PK" on public."Supplier" (cost=0.28..0.30 rows=1 width=44) (actual time=0.003..0.003 rows=1 loops=41)

  • Output: "Supplier".id, "Supplier".label, "Supplier"."codeInternal", "Supplier"."extId", "Supplier"."idSupplierParent
  • Index Cond: ("Supplier".id = "Supplier_Site"."idSupplier")
  • Buffers: shared hit=121 read=2
62. 0.041 0.041 ↑ 1.0 1 41

Index Scan using "Supplier_PK" on public."Supplier" parentsupplier (cost=0.28..0.53 rows=1 width=40) (actual time=0.001..0.001 rows=1 loops=41)

  • Output: parentsupplier.id, parentsupplier.label, parentsupplier."codeInternal", parentsupplier."extId
  • Index Cond: (parentsupplier.id = "Supplier"."idSupplierParent")
  • Buffers: shared hit=123
63. 8.364 8.364 ↑ 1.0 1 41

Index Scan using "User_PK" on public."User" (cost=0.28..3.26 rows=1 width=41) (actual time=0.204..0.204 rows=1 loops=41)

  • Output: "User".id, "User".username, "User".password, "User"."firstName", "User"."lastName", "User"."dateLastConnection", "User"."idSiteOwner", "User"."isActive", "User"."extId", "User".email, "User".type, "User"."dateTokenExpira (...)
  • Index Cond: ("User".id = select_supplier_order_1."idUserResponsible")
  • Buffers: shared hit=121 read=2
64. 0.041 0.041 ↑ 1.0 1 41

Index Scan using "Site_PK" on public."Site" site_delivered (cost=0.28..3.25 rows=1 width=44) (actual time=0.001..0.001 rows=1 loops=41)

  • Output: site_delivered.id, site_delivered.label, site_delivered.type, site_delivered.status, site_delivered.link, site_delivered."codeInternal", site_delivered."isPaymentActive", site_delivered."extId", site_delivered."idClient", site (...)
  • Index Cond: (site_delivered.id = select_supplier_order_1."idSiteDelivered")
  • Buffers: shared hit=123
65. 0.041 0.041 ↑ 1.0 1 41

Index Scan using "Site_PK" on public."Site" site_invoiced (cost=0.28..3.25 rows=1 width=44) (actual time=0.001..0.001 rows=1 loops=41)

  • Output: site_invoiced.id, site_invoiced.label, site_invoiced.type, site_invoiced.status, site_invoiced.link, site_invoiced."codeInternal", site_invoiced."isPaymentActive", site_invoiced."extId", site_invoiced."idClient", site_invoiced.tags, (...)
  • Index Cond: (site_invoiced.id = select_supplier_order_1."idSiteInvoiced")
  • Buffers: shared hit=123
66.          

CTE supplier_order_full

67. 1.280 588.199 ↓ 43.6 698 1

WindowAgg (cost=74.75..75.16 rows=16 width=5,769) (actual time=586.871..588.199 rows=698 loops=1)

  • Output: select_supplier_order_infos.id, select_supplier_order_infos.umpteenth, select_supplier_order_infos."dateValidated", select_supplier_order_infos."timeValidated", select_supplier_order_infos."dateDelivery", select_supplier_order_infos."send (...)
  • Buffers: shared hit=28,888 read=233
68. 0.827 586.919 ↓ 43.6 698 1

Sort (cost=74.75..74.80 rows=16 width=5,737) (actual time=586.858..586.919 rows=698 loops=1)

  • Output: select_supplier_order_infos.id, select_supplier_order_infos.umpteenth, select_supplier_order_infos."dateValidated", select_supplier_order_infos."timeValidated", select_supplier_order_infos."dateDelivery", select_supplier_order_infos (...)
  • Sort Key: select_supplier_order_infos.id
  • Sort Method: quicksort Memory: 733kB
  • Buffers: shared hit=28,888 read=233
69. 0.566 586.092 ↓ 43.6 698 1

Hash Join (cost=0.03..74.44 rows=16 width=5,737) (actual time=563.505..586.092 rows=698 loops=1)

  • Output: select_supplier_order_infos.id, select_supplier_order_infos.umpteenth, select_supplier_order_infos."dateValidated", select_supplier_order_infos."timeValidated", select_supplier_order_infos."dateDelivery", select_supplier_order (...)
  • Hash Cond: (select_products."idOrderSupplier" = select_supplier_order_infos.id)
  • Buffers: shared hit=28,888 read=233
70. 570.156 570.156 ↑ 2.2 1,441 1

CTE Scan on select_products (cost=0.00..62.52 rows=3,126 width=2,222) (actual time=523.299..570.156 rows=1,441 loops=1)

  • Output: select_products."idOrderSupplier", select_products."idOrderSupplierProduct", select_products."idSupplierProduct", select_products."labelProduct", select_products."_labelProduct", select_products."referenceProduct", selec (...)
  • Buffers: shared hit=24,572 read=227
71. 0.015 15.370 ↓ 41.0 41 1

Hash (cost=0.02..0.02 rows=1 width=3,515) (actual time=15.370..15.370 rows=41 loops=1)

  • Output: select_supplier_order_infos.id, select_supplier_order_infos.umpteenth, select_supplier_order_infos."dateValidated", select_supplier_order_infos."timeValidated", select_supplier_order_infos."dateDelivery", select_supplier (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 24kB
  • Buffers: shared hit=4,316 read=6
72. 15.355 15.355 ↓ 41.0 41 1

CTE Scan on select_supplier_order_infos (cost=0.00..0.02 rows=1 width=3,515) (actual time=10.364..15.355 rows=41 loops=1)

  • Output: select_supplier_order_infos.id, select_supplier_order_infos.umpteenth, select_supplier_order_infos."dateValidated", select_supplier_order_infos."timeValidated", select_supplier_order_infos."dateDelivery", select_su (...)
  • Buffers: shared hit=4,316 read=6
73. 589.981 589.981 ↓ 43.6 698 1

CTE Scan on supplier_order_full (cost=0.00..0.36 rows=16 width=5,801) (actual time=586.877..589.981 rows=698 loops=1)

  • Output: supplier_order_full.id, supplier_order_full.umpteenth, supplier_order_full."dateValidated", supplier_order_full."timeValidated", supplier_order_full."dateDelivery", supplier_order_full."sendingMode", supplier_order_full.status, supplier_ord (...)
  • Buffers: shared hit=28,888 read=233
Planning time : 10.733 ms
Execution time : 596.380 ms