Alipay Interview Question

What are several ways to optimize database performance when fetching large data using REST API ?