Checking the size of the Document Store

You should use the docstore maintenance report to check docstore size and delete no longer needed documents. Alternatively, you can use following SQL´s to quickly check the number of documents in the main docstore directories.

Symptoms

The size of your docstore report is quite large and contains unnecessary documents.

Resolving the problem

Use the docstore maintenance report, see Document store maintenance, to check docstore size and delete no longer needed documents.
  • Oracle
    SELECT DIRECTORY, count ( 1 ) FROM
     (SELECT SUBSTR( dhi_doc_path,0,INSTR( dhi_doc_path,'/', 1,2 ))
    DIRECTORY FROM dhi
      WHERE not dhi_doc_path is null )
    GROUP BY DIRECTORY
    ORDER BY count(1) DESC
  • DB2
    SELECT DIRECTORY, count ( 1 ) FROM
     (SELECT SUBSTR( dhi_doc_path,1,posstr(strip(dhi_doc_path,L,'/'),'/'))
    DIRECTORY FROM dhi
      WHERE not dhi_doc_path is null )
    GROUP BY DIRECTORY
    ORDER BY count(1) DESC