Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.31 KB | None | 0 0
  1. ```
  2. EXPLAIN ANALYZE SELECT print.uuid, print.created, print.updated, print.deleted, print.bureau, print.copy, print.notes, print."order", print.line_item, print.name, print.process_step, print.process_step_position, print.post_processor_run, print.order_step_status, print.tracking_information, print.run, run.status AS status, "order".name AS order_name, material.name AS material_name, "order".due_date AS order_due_date, line_item.model, model.x_dimension * model.y_dimension * model.z_dimension AS size
  3. FROM print JOIN "order" ON print."order" = "order".uuid JOIN line_item ON print.line_item = line_item.uuid LEFT OUTER JOIN material ON line_item.base_material = material.uuid LEFT OUTER JOIN model ON RIGHT(LEFT(line_item.model, -1), 36) = model.uuid::text LEFT OUTER JOIN run ON print.run = run.uuid
  4. WHERE print.bureau IN ('54e686a4-71aa-45cd-87b8-ec7e0a8d82d3'::uuid) AND print.deleted IS NULL ORDER BY print.uuid ASC
  5. ```
  6.  
  7. ```
  8. Sort (cost=3058018.10..3062099.98 rows=1632754 width=1332) (actual time=90.993..93.974 rows=19792 loops=1)
  9. Sort Key: print.uuid
  10. Sort Method: external merge Disk: 4304kB
  11. -> Hash Join (cost=7441.91..43365.56 rows=1632754 width=1332) (actual time=55.592..74.210 rows=19792 loops=1)
  12. Hash Cond: (print.line_item = line_item.uuid)
  13. -> Hash Left Join (cost=58.79..1397.84 rows=19767 width=1235) (actual time=0.400..12.202 rows=19792 loops=1)
  14. Hash Cond: (print.run = run.uuid)
  15. -> Hash Join (cost=28.17..1291.77 rows=19767 width=1231) (actual time=0.189..9.453 rows=19792 loops=1)
  16. Hash Cond: (print."order" = "order".uuid)
  17. -> Seq Scan on print (cost=0.00..991.80 rows=19767 width=1209) (actual time=0.008..4.313 rows=19792 loops=1)
  18. Filter: ((deleted IS NULL) AND (bureau = '54e686a4-71aa-45cd-87b8-ec7e0a8d82d3'::uuid))
  19. Rows Removed by Filter: 8832
  20. -> Hash (cost=21.41..21.41 rows=541 width=38) (actual time=0.177..0.177 rows=541 loops=1)
  21. Buckets: 1024 Batches: 1 Memory Usage: 42kB
  22. -> Seq Scan on "order" (cost=0.00..21.41 rows=541 width=38) (actual time=0.003..0.106 rows=541 loops=1)
  23. -> Hash (cost=21.94..21.94 rows=694 width=20) (actual time=0.209..0.209 rows=694 loops=1)
  24. Buckets: 1024 Batches: 1 Memory Usage: 44kB
  25. -> Seq Scan on run (cost=0.00..21.94 rows=694 width=20) (actual time=0.003..0.128 rows=694 loops=1)
  26. -> Hash (cost=4279.00..4279.00 rows=96890 width=129) (actual time=55.126..55.126 rows=1173 loops=1)
  27. Buckets: 32768 Batches: 8 Memory Usage: 285kB
  28. -> Merge Left Join (cost=1839.16..4279.00 rows=96890 width=129) (actual time=47.940..54.648 rows=1173 loops=1)
  29. Merge Cond: (("right"("left"((line_item.model)::text, '-1'::integer), 36)) = ((model.uuid)::text))
  30. -> Sort (cost=140.57..143.50 rows=1173 width=105) (actual time=2.906..3.196 rows=1173 loops=1)
  31. Sort Key: ("right"("left"((line_item.model)::text, '-1'::integer), 36))
  32. Sort Method: quicksort Memory: 356kB
  33. -> Hash Left Join (cost=3.91..80.77 rows=1173 width=105) (actual time=0.035..1.428 rows=1173 loops=1)
  34. Hash Cond: (line_item.base_material = material.uuid)
  35. -> Seq Scan on line_item (cost=0.00..60.73 rows=1173 width=101) (actual time=0.003..0.134 rows=1173 loops=1)
  36. -> Hash (cost=2.85..2.85 rows=85 width=36) (actual time=0.025..0.025 rows=85 loops=1)
  37. Buckets: 1024 Batches: 1 Memory Usage: 14kB
  38. -> Seq Scan on material (cost=0.00..2.85 rows=85 width=36) (actual time=0.003..0.013 rows=85 loops=1)
  39. -> Sort (cost=1698.59..1739.89 rows=16520 width=40) (actual time=45.026..47.262 rows=16802 loops=1)
  40. Sort Key: ((model.uuid)::text)
  41. Sort Method: quicksort Memory: 2909kB
  42. -> Seq Scan on model (cost=0.00..541.20 rows=16520 width=40) (actual time=0.007..7.663 rows=16520 loops=1)
  43. Planning time: 0.586 ms
  44. Execution time: 95.408 ms
  45. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement