Download a backup of the database and restore it locally in Postgres. Postgres has some analyses tools to see how much data each entity has.
Regards,
Ronald
Just do it live on the system.
Using com.mendix.core.Core.dataStorage()
you can run SELECT pg_size_pretty( pg_database_size($YOURDBNAME) )
. This will provide you with an overview. Running SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND C.relkind <> 'i' AND nspname !~ '^pg_toast' ORDER BY pg_total_relation_size(C.oid) DESC
will provide you with an overview per relation.
For the cloudboxes, you can get the database name as follows:
com.mendix.core.Core.dataStorage().executeWithConnection(
function(a){
try{
dbname=a.getCatalog();
}catch(e){
alert(e);
}
}
);
Sample output:
Overview:
Details:
If your app is using Scheduled events, or sending out emails, it happens a lot that it is not considdered that that data is stored in the database.
I’ve seen apps with over 1.000.000 records in the scheduled event database table (System.ScheduledEventInformation) without anyone knowing it.
Como podria hacer un analisis de datos que guardo en alguna entidad, con todos su atributos