Description:
We would like to estimate the file size of the models in a Mart database. Is there a way to do so?
Solution:
The file size of a model is not stored in Mart, so there is no way to do it directly. However, one can get the object count for a model in a database via a query as follows. The following query is based on a Mart in MS SQL Server DBMS, and can be executed at the database level using a query tool.
It will give you the model names and their entity and attribute counts.
(The logic for this query will be the same for the other mart supported databases such as Oracle and PostgreSQL)
select m9c2.C_Name 'Model',
m9c1.C_Version 'Version',
m9c1.C_Id,
m9c1.entcnt,
m9c1.attcnt
from m9catalog m9c1,
m9catalog m9c2
where m9c1.C_Type = 'V'
and m9c2.C_Id = m9c1.C_Container_Id
order by 1,2
OR
select m9cg.C_Name 'Model',
count(m9rd.O_Name) AS 'no. entities',
count(m9rd2.O_Name) AS 'no. attributes'
from m9reportdata m9rd,
m9reportdata m9rd2,
m9catalog m9cg
where m9rd.O_Type = 1075838979
and m9rd2.O_Type = 1075838981
and m9rd.C_Id = m9cg.C_Id
and m9rd2.C_Id = m9cg.C_Id
and m9cg.C_Type = 'D'
GROUP BY m9cg.C_Name
You can then open one large model from Mart in erwin, save offline to see its size. Check the file size against the object count and use that to get an approximate size of the models in Mart.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center