OnDemand Users Group

Support Forums => CMOD for Multiplatforms => Topic started by: jose.arotinco on May 24, 2011, 05:17:09 PM

Title: Number of documents loaded in CMOD?
Post by: jose.arotinco on May 24, 2011, 05:17:09 PM

Hi all,

Is there any way of knowing how many there are documents loaded in CMOD of all the AG?  there may be a command or example that can give me

Thank you very much..

Regards;
Title: Re: Number of documents loaded in CMOD?
Post by: Alessandro Perucchi on May 24, 2011, 07:38:53 PM
Hello Jose,

Well the most direct way would be to do a "SELECT COUNT(*) FROM AGTableSegment"

where AGTableSegment is the all the tablename of an Application Group.

exemple

SELECT COUNT(*) FROM ADA1

To find the active table segment:

SELECT AGID, TABLE_NAME FROM ARSSEG

or if you love better to see the actual name instead of the AGID:

SELECT DISTINCT A.NAME, B.TABLE_NAME FROM ARSAG AS A,  ARSSEG AS B WHERE A.AGID=B.AGID

I hope this helps.

Cheers,
Alessandro
Title: Re: Number of documents loaded in CMOD?
Post by: jose.arotinco on May 24, 2011, 08:44:49 PM
Thanks Alessandro! with the help of your example, I did the following query:

SELECT
DISTINCT A.NAME
B.TABLE_NAME,
SUM (B.INS_ROWS) AS INSERTED,
SUM (B.DEL_ROWS) AS DELETED
ARSAG FROM AS A AS B ARSSEG
WHERE A.AGID = B.AGID
GROUP BY A.NAME, B.TABLE_NAME
ORDER BY 3

Regards,