[PARTIALLY SOLVED] Simple condition takes 3 seconds to load - what would you do?

Oh, here it is!

there will eventually be hundreds of thousands of notifications to search through, but each user will only have hundreds of notifications tied to them

I’m pasting an answer from How can I optimize a search capacity-wise? - #2 by NigelG, hope it clarifies a bit more:

"Think of it as a sieve…

Try to get rid of the big lumps first. So in this case you want to filter out the 9,900 orders that are not for this customer as early and quickly as possible.

You can do that by having a list of orders on the customer. Then the database knows exactly what 100 things to go and look at first to see if it was in January.

What you don’t want to do, is search each and every one of the 10,000 orders looking for January, and then take that and search through all the customers to see if this is for the customer you want.

List > Search Constraint > Filter > Advanced Filter

Try to get as much done towards the left of that as possible."

Also, I took a look at the thread you mentioned, but I’ve seen the devs mention that searches are more efficient than filters in general, and I’m not sure that server-side is slower than client-side, but I’m not a dev. Usually it depends a lot on the page context, but I’d like to focus on what I pasted above instead of “filter VS search” discussion as the above (the data structure) seems to be the main issue for now.

1 Like