OnDemand User Group

Support Forums => MP Server => Topic started by: jsquizz on October 14, 2019, 09:26:40 AM

Title: Need help with a query, DB2.
Post by: jsquizz on October 14, 2019, 09:26:40 AM
This is probably a very simple query, but not sure of the best way to approach it. anyways instead of just asking for someone to DO it for me, here's my scenario.

I need to query datatables for two things

1) row count for total docs loaded
2) total number of doc names

Concern of course is for when there's tables that go above our 25,000,000 row limit, or whatever we have it setup in prod as.

I am thinking for this the arsseg table is a good way to start. I can query-

select a.name, b.table_name from arsag a, arsseg b where a.agid=b.agid

Why am I doing this?

Writing a little script so my ops team can see, "where an extraction process is at"

thanks in advance, as always I am open to any other approaches
Title: Re: Need help with a query, DB2.
Post by: Justin Derrick on October 14, 2019, 10:46:47 AM
The CMOD Wiki to the rescue:  https://cmod.wiki/index.php?title=Useful_SQL_Queries_for_Content_Manager_OnDemand#How_many_documents_are_in_CMOD_Application_Groups.3F

And you want to do a "select distinct doc_name on <table>" to get a list of objects.  But this might not be a good way to reconcile your old vs. new loads.

-JD.
Title: Re: Need help with a query, DB2.
Post by: jsquizz on October 14, 2019, 10:54:43 AM
The CMOD Wiki to the rescue:  https://cmod.wiki/index.php?title=Useful_SQL_Queries_for_Content_Manager_OnDemand#How_many_documents_are_in_CMOD_Application_Groups.3F

And you want to do a "select distinct doc_name on <table>" to get a list of objects.  But this might not be a good way to reconcile your old vs. new loads.

-JD.

YES

Second query is perfect Thanks!