Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- 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
- 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
- WHERE print.bureau IN ('54e686a4-71aa-45cd-87b8-ec7e0a8d82d3'::uuid) AND print.deleted IS NULL ORDER BY print.uuid ASC
- ```
- ```
- Sort (cost=3058018.10..3062099.98 rows=1632754 width=1332) (actual time=90.993..93.974 rows=19792 loops=1)
- Sort Key: print.uuid
- Sort Method: external merge Disk: 4304kB
- -> Hash Join (cost=7441.91..43365.56 rows=1632754 width=1332) (actual time=55.592..74.210 rows=19792 loops=1)
- Hash Cond: (print.line_item = line_item.uuid)
- -> Hash Left Join (cost=58.79..1397.84 rows=19767 width=1235) (actual time=0.400..12.202 rows=19792 loops=1)
- Hash Cond: (print.run = run.uuid)
- -> Hash Join (cost=28.17..1291.77 rows=19767 width=1231) (actual time=0.189..9.453 rows=19792 loops=1)
- Hash Cond: (print."order" = "order".uuid)
- -> Seq Scan on print (cost=0.00..991.80 rows=19767 width=1209) (actual time=0.008..4.313 rows=19792 loops=1)
- Filter: ((deleted IS NULL) AND (bureau = '54e686a4-71aa-45cd-87b8-ec7e0a8d82d3'::uuid))
- Rows Removed by Filter: 8832
- -> Hash (cost=21.41..21.41 rows=541 width=38) (actual time=0.177..0.177 rows=541 loops=1)
- Buckets: 1024 Batches: 1 Memory Usage: 42kB
- -> Seq Scan on "order" (cost=0.00..21.41 rows=541 width=38) (actual time=0.003..0.106 rows=541 loops=1)
- -> Hash (cost=21.94..21.94 rows=694 width=20) (actual time=0.209..0.209 rows=694 loops=1)
- Buckets: 1024 Batches: 1 Memory Usage: 44kB
- -> Seq Scan on run (cost=0.00..21.94 rows=694 width=20) (actual time=0.003..0.128 rows=694 loops=1)
- -> Hash (cost=4279.00..4279.00 rows=96890 width=129) (actual time=55.126..55.126 rows=1173 loops=1)
- Buckets: 32768 Batches: 8 Memory Usage: 285kB
- -> Merge Left Join (cost=1839.16..4279.00 rows=96890 width=129) (actual time=47.940..54.648 rows=1173 loops=1)
- Merge Cond: (("right"("left"((line_item.model)::text, '-1'::integer), 36)) = ((model.uuid)::text))
- -> Sort (cost=140.57..143.50 rows=1173 width=105) (actual time=2.906..3.196 rows=1173 loops=1)
- Sort Key: ("right"("left"((line_item.model)::text, '-1'::integer), 36))
- Sort Method: quicksort Memory: 356kB
- -> Hash Left Join (cost=3.91..80.77 rows=1173 width=105) (actual time=0.035..1.428 rows=1173 loops=1)
- Hash Cond: (line_item.base_material = material.uuid)
- -> Seq Scan on line_item (cost=0.00..60.73 rows=1173 width=101) (actual time=0.003..0.134 rows=1173 loops=1)
- -> Hash (cost=2.85..2.85 rows=85 width=36) (actual time=0.025..0.025 rows=85 loops=1)
- Buckets: 1024 Batches: 1 Memory Usage: 14kB
- -> Seq Scan on material (cost=0.00..2.85 rows=85 width=36) (actual time=0.003..0.013 rows=85 loops=1)
- -> Sort (cost=1698.59..1739.89 rows=16520 width=40) (actual time=45.026..47.262 rows=16802 loops=1)
- Sort Key: ((model.uuid)::text)
- Sort Method: quicksort Memory: 2909kB
- -> Seq Scan on model (cost=0.00..541.20 rows=16520 width=40) (actual time=0.007..7.663 rows=16520 loops=1)
- Planning time: 0.586 ms
- Execution time: 95.408 ms
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement