1
Automation Interface, Add-Ins and Tools / Re: Repository.SQLQuery(string) returns an empty string
« on: October 30, 2019, 07:51:18 pm »
Yes, that is a really good advice. And we do that already.
We did not query all tagged values in the beginning, because for the task at hand not all tagged values are needed. But almost. So we filtered the tagged values in a WHERE clause first. The problem is that at some point the SQL query becomes to complex to be executed by JET. So multiple SQL queries were needed. The performance was simply too bad. Even with one SQL query, it is much faster to filter the results in memory instead of asking the JET database to do it for you.
I have the impression, that the size of the database causes the problem. In the past it was half the size and everything worked well. How big are your JET databases? For me 150 MB after a compact feels impressive for Enterprise Architect models.
Yes, you cannot give up working with EA objects completely. Sometimes you need them when changes should be recognized by Enterprise Architect to update the user interface efficiently. But sadly, Repository.GetElementByID(int) does not scale. The response time depends on the number of children of the requested element.
We did not query all tagged values in the beginning, because for the task at hand not all tagged values are needed. But almost. So we filtered the tagged values in a WHERE clause first. The problem is that at some point the SQL query becomes to complex to be executed by JET. So multiple SQL queries were needed. The performance was simply too bad. Even with one SQL query, it is much faster to filter the results in memory instead of asking the JET database to do it for you.
I have the impression, that the size of the database causes the problem. In the past it was half the size and everything worked well. How big are your JET databases? For me 150 MB after a compact feels impressive for Enterprise Architect models.
Yes, you cannot give up working with EA objects completely. Sometimes you need them when changes should be recognized by Enterprise Architect to update the user interface efficiently. But sadly, Repository.GetElementByID(int) does not scale. The response time depends on the number of children of the requested element.