Collapse Submit a Service Request Contact Information for Technical SupportMy Service Notifications
Can't perform a select statement even with small limit in ROQL
Answer ID 12091 | Last Review Date 02/15/2022
Why do I get "poor performing query" even when I only get one row of data?
- Oracle B2C Service, any version
- Connect APIs (SOAP, REST, PHP), any version
- Customizations using RightNow Object Query Language (ROQL)
The following query returned Poor performing query - too many rows examined:
SELECT ID FROM Contact LIMIT 1
The contacts table is large and/or linked to many custom objects. The LIMIT clause does not make the query examine fewer rows.
Include an appropriate WHERE clause in the query to reduce the number of rows scanned.
See the documentation for the API you are using for further information on constructing ROQL queries. Each is linked from the answer Technical Documentation and Sample Code.