You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from FunctionCall target
where
predicate1(target)
and predicate2(target)
and predicate3(target)
and predicate4(target)
select target, target.getLocation().toString()
I found that if I query one predicate at a time, the time is very short, if I query 4 times separately, will the intersection of the results be the result of querying all the predicates at once?
If so, why is the sum of the time for the separate query so much shorter than the time for the one-time query?
The text was updated successfully, but these errors were encountered:
I'm not sure I fully understand your question. I assume you are using the CodeQL for VSCode extension's quick-evaluation feature to evaluate the 4 predicates in isolation and to run the query as a whole. Measuring runtime like that is quite tricky, because CodeQL caches intermediate results, so if you ran the whole query, the individual predicates are likely to be fast because their results are in the cache. There is a command CodeQL: Clear Cache that might help a bit.
Another difference is that the whole query calculates the locations and their toString values. This probably doesn't cost much time, but if there are a lot of locations it might be noticeable.
Hi! I'm using a query like:
I found that if I query one predicate at a time, the time is very short, if I query 4 times separately, will the intersection of the results be the result of querying all the predicates at once?
If so, why is the sum of the time for the separate query so much shorter than the time for the one-time query?
The text was updated successfully, but these errors were encountered: