[Question] How to eliminate cartesian product for negation
- Langage dominant
- CodeQL
- Étoiles
- 10.1k
- Forks
- 2.1k
- Merge moyen
- 2 j 15 h
- PR mergées (30 j)
- 141
Description
Hello,
I have the following code :
```
class Foo extends Class {
Foo() {
not isAbstract()
and exists(Bar i | extendsOrImplements(i))
}
```
My understanding from the documentation (https://codeql.github.com/docs/writing-codeql-queries/troubleshooting-query-performance/#eliminate-cartesian-products) is that can lead to computing the cartesian product of the two sets, is it possible to improve the performance of this class?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with the linked CodeQL query-performance troubleshooting documentation and the provided predicate expression. No source file or test is named, so inspect how negation and exists are evaluated in this query context. Done means providing a supported explanation or documentation guidance for avoiding the reported cartesian-product cost.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Domaine
- performance, security
- Type d'issue
- Documentation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100