We have multiple environments for a website including local, UAT (single Azure instance), CM (Azure production for authoring) and CD (content delivery).
The following code is on all instances and feeds an API.
Context.Database.SelectItems("/sitecore/content/global/articles/descendant::*[@@templatename = 'Sample']").ToList();
For some reason it works as expected on local and UAT, but does not pull back all anticipated items on CM and CD.
As far as I can tell, the only difference is Redis cache. Azure search is being used for indexing, but I think that's a moot point since I believe standard queries hit the database instead of an index right?
Anything I may be overlooking related to Azure and Sitecore standard queries?
<setting name="Query.MaxItems" ...>
setting?