Search Fields Not Limiting SOQL

  • 1
  • Problem
  • Updated 5 months ago
  • Solved
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

Photo of Andy Shipsides

Andy Shipsides

  • 430 Points 250 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Official Response
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.