Hello,
we have a question about a performance issue in a query.
We executed a query on the following entity and there is only one entity in the database and we expects that the query is executed within 1 ms.
SELECT v.sheetUID FROM TCVector
But how you can see in the attached snapshot 'stacktrace.png' the execution needs several seconds and we are wondered about the visitRefs and visitKeyRefs calls in the snapshot.
Can you explain why the database spends so much time in the visitRefs and visitKeyRefs?
@Entity @Access (AccessType.FIELD) public class TCVector { @Basic private String architecture; @Basic private String scopeID; @Basic private String name; @Basic private String description; @Basic private int signalIndex = 0; @OneToMany (cascade = CascadeType.ALL, targetEntity = TCSignal.class, fetch = FetchType.LAZY) private List<TCSignal> signals = new ArrayList<>(); @ElementCollection private TreeSet<Long> stepNumbers = new TreeSet<>(); @Basic private String sheetUID; @Transient private StepNumberCache stepNumberCache;