Optimize fast query performance

Hi

We are using fast queries to fetch sitecore items and its taking longer than expected. The fast query results in the corresponding SQL query which we can view using SQL Profiler.

Is there any way we could optimize SQL query ,i am not sure if its possible/recommended as its result of Sitecore Fast query directly.

Sitecore content heirarchy:

Content --Home--sponsor/* - need to get all sponsors for a specific code.

Sample Linq query:

fast:/sitecore/content/Home/sponsors//*[@Code='{0}']

Corresponding SQL query:

SELECT DISTINCT [i].[ID] [ID], [i].[ParentID] [ParentID] FROM [Items] [i]
LEFT OUTER JOIN (SELECT [Fields].* from [Fields]
INNER JOIN [Items] ON [Fields].[FieldID] = [Items].[ID] AND lower([Items].[Name]) = 'sponsor id') [Fields1] ON [i].[ID] = [Fields1].[ItemId]
INNER JOIN [Descendants] ON [i].[ID] = [Descendants].[Descendant]
INNER JOIN (SELECT DISTINCT [i].[ID] [ID], [i].[ParentID] [ParentID] FROM [Items] [i]
INNER JOIN (SELECT DISTINCT [i].[ID] [ID], [i].[ParentID] [ParentID] FROM [Items] [i]
INNER JOIN (SELECT DISTINCT [i].[ID] [ID], [i].[ParentID] [ParentID] FROM [Items] [i]
INNER JOIN (SELECT DISTINCT [i].[ID] [ID], [i].[ParentID] [ParentID] FROM [Items] [i]
WHERE LOWER([i].[Name]) = 'sitecore' AND [i].[ParentID] = @value1) [a] ON [i].[ParentID] = [a].[ID]
WHERE LOWER([i].[Name]) = 'content') [a] ON [i].[ParentID] = [a].[ID] WHERE LOWER([i].[Name]) = 'home') [a] ON [i].[ParentID] = [a].[ID]
WHERE LOWER([i].[Name]) = 'sponsors') [a] ON [Descendants].[Ancestor] = [a].[ID] WHERE (coalesce([Fields1].[Value], '') LIKE @value2

It would be great if anyone can suggest if there is a way to optimize the SQL/Fast query? Just to note that there are close to 1000+ sitecore items returned for this query. 

" coalesce "- if removed in SQL the query executes faster.

 

Thanks

Nithin