I have a large dataset and I need to split these up for processing in bulk. I want to try and mitigate memory or performance-related issues so would it be better to chunk the results after querying or do it as part of the query? We're talking ~65k records here.
i.e. Model::where()->get()->chunk(5000) vs Model::where(...)->chunk(5000, fn ($chunk) => //... )