I am looking to fetch SP data using sharepoint Folder based Rest api. When i use filters, it is taking long time (close to one minute) to fetch the data. when i use pages rest api instead of folder level, that is faster. But my need is to hit the folder api. Any help would be appreciated.
Example: this is faster - https://sharepoint.com/sites/mysite/_api/Web/Lists/ GetByTitle('pages')/items?$ select=field1,field2,field3&$orderby=field5&$filter=field6&$top=10
This is slow - https://sharepoint.com/sites/mysite/_api/web/ GetFolderByServerRelativeUrl('pages/myfolder')/files?$select=ListItemAllFields/field1,ListItemAllFields/field2, ListItemAllFields/field3&$orderby=field5&$filter=ListItemAllFields/field6&$top=10
Do i need to change the way i am querying the folder to improve the performance?