What Should I Do If It Takes a Long Time to Obtain the Total Number of Data Records of a Table Through an API If the Table Contains a Large Amount of Data?
Scenario
During API creation, Return Total Records is enabled. If a table contains a large amount of data, obtaining the total number of data records of the table through an API is time-consuming.
Solution
During a pagination query, you can use the use_total_num parameter to determine whether the total number of data records is calculated and returned.
For example,, add parameter use_total_num and set its value to 1 to obtain the total number of data records. In subsequent requests, add parameter use_total_num and set its value to 0 so that the total number of data records is not returned.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot