Differences between using the GetRange and Search APIs for range queries
Difference | GetRange API | Search API |
Real-time query performance | Queries run directly on the data table without needing an index. Data can be queried as soon as it is written. For more information about the GetRange API, see Read data and GetRange. | Queries run on a search index. The search index and the data table synchronize asynchronously. After data is written, you must wait for synchronization to finish before you can query the data. Synchronization usually completes within 3 seconds. For more information about the Search API, see Introduction to Search Index and Search. |
Computing resource consumption and scalability | The system locates data table partitions based on the specified timestamp range. Read operations run only in these partitions. This process consumes few computing resources and is scalable. | Computing resource consumption and scalability vary depending on whether you specify a routing key when you create the search index.
For more information about how to create a search index, see Create a search index. |
Data filtering support | Performs only data scans and does not support complex data filtering. | Supports filtering by any combination of column conditions for greater flexibility. |