Skip to main content

I have an Item List Skuid page which lists out a custom Item object. The query is very slow and I’m working to track it down. Here is my initial SOQL for on the page load: 

SELECT Name,SCMC__Item_Description__c,AC_Lowest_Supplier_Catalog_Price__c,AC_Lowest_Catalog_Cost__c,AC_Archived__c,AC_Catalog_Supplier_Manufacturer_Numbers__c,Popularity__c,AC_End_of_Life__c,Product_Type__c,Product_Line__c,Product_Line__r.Name,Inventory_Locations__c,Final_Price__c,Final_MAP_Price__c,Image_Count__c,Available_Inventory_Locations__c,Available_Inventory_Total__c,Stock_Available__c,Before_Rebate_Price__c,Before_Rebate_Price_Text__c,Instant_Savings_Text__c,Instant_Rebates_Applied__c,Special_Order_Item__c,Inventory_ETA__c,Rent_Policy__c,QuantityToAdd__c,New_Title__c,AC_Item_Class__c,Starting_At_Price__c,Minimum_Advertised_Price__c,Thumbnail_URL__c,INVC_All_Offices_Available_New__c,INVC_All_Office_Retail_Available_New__c,INVC_All_Offices_Available_Used__c,Id,CurrencyIsoCode 

FROM SCMC__Item__c 

WHERE (AC_Archived__c = false)AND(AC_End_of_Life__c = false) 

ORDER BY Popularity__c DESC LIMIT 21


So I’m not loading up too much, but it is taking a long time to query - working with salesforce on this one. But additional fields is taking a very long time. On the table I’ve set the search fields to be limited to Name, Title_c, AC_Catalog_Supplier_Manufacturer_Numbers__c, and SCMC_Description. Tokenized is set to on. But when I do a search on the table for the word ‘card’ I see it is actually searching all the fields. Here is the SOQL:

SELECT Name,SCMC__Item_Description__c,AC_Lowest_Supplier_Catalog_Price__c,AC_Lowest_Catalog_Cost__c,AC_Archived__c,AC_Catalog_Supplier_Manufacturer_Numbers__c,Popularity__c,AC_End_of_Life__c,Product_Type__c,Product_Line__c,Product_Line__r.Name,Inventory_Locations__c,Final_Price__c,Final_MAP_Price__c,Image_Count__c,Available_Inventory_Locations__c,Available_Inventory_Total__c,Stock_Available__c,Before_Rebate_Price__c,Before_Rebate_Price_Text__c,Instant_Savings_Text__c,Instant_Rebates_Applied__c,Special_Order_Item__c,Inventory_ETA__c,Rent_Policy__c,QuantityToAdd__c,New_Title__c,AC_Item_Class__c,Starting_At_Price__c,Minimum_Advertised_Price__c,Thumbnail_URL__c,INVC_All_Offices_Available_New__c,INVC_All_Office_Retail_Available_New__c,INVC_All_Offices_Available_Used__c,Id,CurrencyIsoCode 

FROM SCMC__Item__c 

WHERE (AC_Archived__c = false)AND(AC_End_of_Life__c = false)AND(((Name LIKE ‘%card%’)OR(SCMC__Item_Description__c LIKE ‘%card%’)OR(AC_Catalog_Supplier_Manufacturer_Numbers__c LIKE ‘%card%’)OR(Product_Type__c LIKE ‘%card%’)OR(Product_Line__r.Name LIKE ‘%card%’)OR(Product_Line__r.Name LIKE ‘%card%’)OR(Inventory_Locations__c LIKE ‘%card%’)OR(Available_Inventory_Locations__c LIKE ‘%card%’)OR(Before_Rebate_Price_Text__c LIKE ‘%card%’)OR(Instant_Savings_Text__c LIKE ‘%card%’)OR(Inventory_ETA__c LIKE ‘%card%’)OR(Rent_Policy__c LIKE ‘%card%’)OR(New_Title__c LIKE ‘%card%’)OR(AC_Item_Class__c LIKE ‘%card%’)OR(Thumbnail_URL__c LIKE ‘%card%’)OR(INVC_All_Offices_Available_New__c LIKE ‘%card%’)OR(INVC_All_Office_Retail_Available_New__c LIKE ‘%card%’)OR(INVC_All_Offices_Available_Used__c LIKE ‘%card%’)OR(PrimaryCategory__c LIKE ‘%card%’)OR(SCMC__Product_Group__r.Name LIKE ‘%card%’))) 

ORDER BY Popularity__c DESC LIMIT 21


Shouldn’t it only be filtering by the 4 fields specified? Seems like it is comparing all the fields. Do you think this is slowing down the query? 

Please let me know.


Andy



UPDATE: This problem only happens from a DECK search. Not a TABLE search!


Hi Andy. Thank you for the detailed information. Have you tried this with the search component as well? And, can you tell us which version of Skuid you’re using?


Running 9.5.1, I assume you mean the filter component Search. I just tried searching in a filter component search and it does get the right SOQL. I had issues with the filter component when it first came out, sometime just locked up. But I could try that again. 


It might be worth trying out. If the Deck component’s Search function isn’t respecting the settings, as you describe, we’ll want to verify and submit that as a product issue. If you wouldn’t mind sharing a screenshot of the search’s settings to help me try and reproduce the issue, that’d be much appreciated. 




Andy, thank you for taking the time to help illlustrate this. I’ve been able to reproduce the behavior on the deck component. As you described, when you limit which fields are searched with the Deck’s search, the search is not actually being limited to those fields. I’ve submitted this as a product issue to our development team, and we will update this Community post when the issue is addressed. 


thought I was imagining it.


Hello Skuid Community ~

This has been addressed in the new Millau 11.2.2 release which is now available on the Skuid Releases page.

As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Reply