Primafact: Determine Document Page Distribution

Primafact: Determine Document Page Distribution

The following SQL query can be run against the Primafact database to determine the number of documents with each page count.
When you run the query, you will see results like this:



The example above indicates that there are 2 documents that have between 28,300 and 28,400 pages.

You should size the computer you are using for the migration appropriately to ensure it can handle all documents of the specified sizes.


  1. DECLARE @RANGE INT = 100

  2. SELECT
  3. Pages_From = (CEILING(PageCount / @RANGE) * @RANGE),
  4. Pages_Till = (CEILING(PageCount / @RANGE) * @RANGE) + @RANGE,
  5. Docs = COUNT(*)
  6. FROM
  7. (
  8. SELECT TOP 999999999
  9. DocId,
  10. PageCount = Count(*)
  11. FROM
  12. _Pages
  13. GROUP BY
  14. DocId
  15. ORDER BY
  16. PageCount DESC

  17. ) PageCounts
  18. GROUP BY
  19. (CEILING(PageCount / @RANGE) * @RANGE)
  20. ORDER BY
  21. Pages_From DESC

    • Related Articles

    • LaserFiche: Determine Document Page Distribution

      The following SQL query can be run against the LaserFiche database to determine the number of documents with each page count. When you run the query, you will see results like this: The example above indicates that there are 2 documents that have ...
    • Primafact: Document Synthesis

      How Primafact is Designed to be Used Primafact is not a document management system. While Primafact does store documents, Primafact is a Litigation Document Management System, not a standard document management system. It is designed to ingest large ...
    • Primafact: Preparing Documents for Backup

      Mapping Matters Prior to backing up documents from Primafact, each yellow folder that represents a matter should be converted to an actual matter folder. To do this, log into Primafact and find yellow folders that represent matters: Right-Click on ...
    • Lead Docket: Determine Api Key

      To determine your Lead Docket API Key do the following: 1. Log into Lead Docket as an Administrator 2. Click on your initials and select "My Account: 3. On the left, select Manage > Settings: 4. At the bottom, copy the Api Key:
    • NetDocuments: Copy Documents to Clio Document storage from Clio integration linked folders

      Clio has an integration with NetDocuments that creates folders in NetDocuments linked to Matters in Clio. If a client making use of this integration wants to move their documents from NetDocuments to being stored in Clio you can use this procedure. ...