So I built an inventory application. I occasionally experience slow queries when retrieving data. This got me worried cos the client is complaining.
So I would paste one of the major query returning slow data.
public async Task<IEnumerable<Customer>> Getcustomers() { var customers = await this.context.Customers.Include(item => item.Customercategory).Include(item=>item.Customercontact).Include(item=>item.Sex).ToListAsync<Customer>(); return customers; }
It takes close to 10 seconds to return data.
Please how do I speeding up my queries when displaying or pulling data from the database. I experience this on just a 100 records.
Thanks alot.