V21.03: After pagination+cascade change, queries are too slow to finish

I only ask because @minhaj seemed to elude to a internal conversation about it above.

However, here is an idea: How about iteratively performing paging and cascade together on the database end. Like say ok, he wants 100 of these and is using cascade, let’s paginate then apply the cascade filter - oh I removed 10 due to cascade filtering, but I know there are more results - grab more and repeat the cascade filtering on that new set.

Seems like that would be better than completely removing paging altogether just to apply it later - in my case increasing the complexity of the query by 1 million times. In the happy path where cascade does not do much filtering (or any), the above is extremely fast, single pass - but currently would take many minutes.

1 Like