moov-io/customers

customers: optimize search customers query

vxio opened this issue · 1 comments

vxio commented

searchCustomers does the following:

  1. retrieves n customerIDs based on the search criteria
  2. calls getCustomer() a total of n times; resulting in n database queries

We can reduce the # of queries to one.

Originally posted by @adamdecaf in #211 (comment)

Thanks for grabbing this