Should combing through 900 records take 45 seconds?

Frankly, I am a bit shocked at how slow it is to query the database, even with few records. Anyone else have this problem, and perhaps, found a solution? I have added capacity, but it made no difference. I am beyond frustrated.

@robert Would you mind sharing a bit about how you’re structuring your search? Is this querying something in the database for a specific answer or are you trying to display things in a repeating group?

You may already be aware, but here are a few things to keep in mind:

  • Keep the difference between searching and filtering in mind. Searching happens at a database level. Filtering happens at a page level. So, when you filter, you’re sending more data than you may need to the page.
  • If your search has to traverse multiple tables (and multiple times) to get an answer, that will impact speed. (Ex. User’s company has > 0 open invoices).
  • Are there large data objects in the record being sent to the page (ex. Current cell’s user’s Picture) for a repeating group.
  • If using a repeating group, are you trying to display all 900 records at once? If you can switch from full list to an infinite scroll or “show next” of results, all the better. (Similar to how Facebook only loads a dozen or so stories at a time).
  • If you’re using Privacy Roles, see if they can be more easily evaluated. (Especially if your search has to traverse multiple tables).

Hope that helps!

1 Like

@dan1 Thanks for the quick reply.

  • Yes, there is a great deal of filtering going on.
  • 1 table
  • no large data objects
  • only 20 records at once
  • no privacy roles

Even with the filtering, it’s only 900 records.

The filtering is all done client side, which will definitely be slower than doing it on the server.

1 Like

Think of it this way: when you’re relying on filter instead of search constraints, all 900 objects are being sent to the page.

By way of quick analogy, pretend you’re a customer of Instacart expecting a bag of groceries. When Instacart shows up at your door, the delivery person only has the items that you ordered. (They picked up your specific list from the store and brought them to you). This is a database search.

When you’re using a search with few parameters and heavy filters, it’s a quite different experience. It’s as if Instacart picked up every item to the store, brought them into your doorstep and then took away everything you didn’t want.

Ideally, you want to construct things using searches first, filters second. And where you require filters, simplify to the greatest extent possible.

1 Like

Agreed. No way it should take that long if you designed the db and queries ok.

Thank you gentlemen. No more filtering here.