What is Better in querying Umbraco Data using Api "Examine Vs TypedContentAtXPath" ?
Hello Everyone,
What is better (in sake of every aspect that can be!)
Between Examine Search and TypedContentAtXPath when needing to Querying Document Types by Alias or nodes or anything.
The conclusion is broadly that on smaller sites, XPath is the most efficient, if I need to find a 'NewsSection' landing page, I'll likely use XPath, as I know where it's defined in the content tree structure, nothing will be faster!... but If I'm implementing filtering by different criteria and paging of results eg searching a News Section, then I'd favour Examine...
What is Better in querying Umbraco Data using Api "Examine Vs TypedContentAtXPath" ?
Hello Everyone, What is better (in sake of every aspect that can be!) Between Examine Search and TypedContentAtXPath when needing to Querying Document Types by Alias or nodes or anything.
Hi Ibrahim
'It depends' a little on what you are querying and the size of your site.
There is a really good article on Skrift by @attackmonkey that examines how long each approach takes to bring back content in certain circumstances:
https://skrift.io/articles/archive/testing-the-performance-of-querying-umbraco/
The conclusion is broadly that on smaller sites, XPath is the most efficient, if I need to find a 'NewsSection' landing page, I'll likely use XPath, as I know where it's defined in the content tree structure, nothing will be faster!... but If I'm implementing filtering by different criteria and paging of results eg searching a News Section, then I'd favour Examine...
regards
Marc
is working on a reply...