Reputation: 257
I have read the following question and its answers which may be related:
Does Sitecore use Fast Query automatically?
We have a large gallery built using Sitecore as a backend. There are number of different gallery pages organized in the tree:
Sitecore->Content->MediaLibrary->Gallery->User->{Photos}->{Photo_State}
Where Photo_State is approved, rejected and so forth
Currently to retrieve the images from the database we use GetAncestors() on the "Gallery" part of the tree. This may retrieve thousands of items from the database which are then filtered down using normal .NET filtering practices.
How can we do this in a more efficient way?
We looked at using the Sitecore Fast Query API to do this but I don't currently understand how we could use this to fix our current problem. So our DB queries are:
Any idea how this could be handled optimally through the Sitecore API?
Upvotes: 0
Views: 495
Reputation: 4180
I agree with Mark. I think you should completely ditch the sitecore query and use a lucene index to get the data.
Here are some resources to get you started:
I have used it on big websites with hundred of thousands of page view a day it is pretty solid.
Upvotes: 2
Reputation: 31435
If you potentially have thousands of items you should use Lucene indexes. The Advanced Database Crawler can make this pretty easy to accomplish.
Upvotes: 1