improve queries performance
This commit is contained in:
parent
25847b16e8
commit
24e2b1bd00
@ -32,10 +32,10 @@ public interface CommitRepository extends JpaRepository<Commit, Integer> {
|
|||||||
@Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(cast(c.date as date), COUNT(DISTINCT c.hash)) FROM Commit c GROUP by cast(c.date as date) ORDER by cast(c.date as date)")
|
@Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(cast(c.date as date), COUNT(DISTINCT c.hash)) FROM Commit c GROUP by cast(c.date as date) ORDER by cast(c.date as date)")
|
||||||
List<CommitTimeStatistic> getCommitTimeStatistic();
|
List<CommitTimeStatistic> getCommitTimeStatistic();
|
||||||
|
|
||||||
@Query("SELECT new ru.ulstu.extractor.model.CommitEntityStatistic(f.containsEntity, COUNT(DISTINCT c.hash)) FROM FileChange f, Commit c WHERE f MEMBER OF c.fileChanges GROUP by f.containsEntity")
|
@Query("SELECT new ru.ulstu.extractor.model.CommitEntityStatistic(f.containsEntity, COUNT(DISTINCT c.hash)) FROM Commit c JOIN c.fileChanges f GROUP by f.containsEntity")
|
||||||
List<CommitEntityStatistic> getCommitEntityStatistic();
|
List<CommitEntityStatistic> getCommitEntityStatistic();
|
||||||
|
|
||||||
@Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(cast(c.date as date), COUNT(DISTINCT c.hash)) FROM Commit c, FileChange f WHERE f MEMBER OF c.fileChanges AND f.containsEntity = true GROUP by cast(c.date as date) ORDER by cast(c.date as date)")
|
@Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(cast(c.date as date), COUNT(DISTINCT c.hash)) FROM Commit c JOIN c.fileChanges f WHERE f.containsEntity = true GROUP by cast(c.date as date) ORDER by cast(c.date as date)")
|
||||||
List<CommitTimeStatistic> getCommitTimeEntityStatistic();
|
List<CommitTimeStatistic> getCommitTimeEntityStatistic();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user