Do not load all orders in one go. Use paging or batch processing instead. Do not use where-clauses after materalization.