Faster to filter large DB with Filter or Filter + Date?

Hello everyone. I was wondering if theres any benefit to the following:

Currently we have a CRM that has thousands of leads, on page load we only show “Active”. Most of the leads that are active have been created in the last 48-72 hours.

Would it be better to filter that repeating group with 2 parameters:
-Status=Active
-Date created < 3 days.

The thinking would that it would only query the leads created in the last 3 days, but if Im reading the docs right, its still going to pull all the database entries and then filter them, which in this case would be 2 filters and make it slower?

Another thing I was brainstorming would be to create a new data type with a single field that is a list of Leads, and use that as a temporary bucket, adding and removing from it, and displaying that on page load.

I hope that makes sense.

Any advice is greatly appreciated.

It’s much faster if you search directly with the “Do a search”… what you probably have read is that the tool “:filter” is slower, and indeed, it is much slower compared when the constrains are directly inside the Do a search

1 Like

As the other poster said, long as you keep the query server side (in the “do a search for” box), you probably won’t notice any difference in whether you have a date constraint or not, since Bubble can execute server side searches on large amounts of data fast. Bubble will also eventually index your database which also will help for speed.

Just make sure your repeating group isn’t downloading all the results at once. Use a scrolling RG or pagination.

Also ensure your datatypes aren’t too “heavy” with data since Bubble will download all the fields from each entry that you pull to the page, unless you have privacy rules limiting which fields can be accessed by the user.