Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a tool to show database space usage #3217

Closed
punktilious opened this issue Jan 20, 2022 · 1 comment
Closed

Need a tool to show database space usage #3217

punktilious opened this issue Jan 20, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@punktilious
Copy link
Collaborator

punktilious commented Jan 20, 2022

Is your feature request related to a problem? Please describe.
In order to understand database space growth, need a tool to query and display usage distribution. How much space is used across the resources, search parameters, indexes etc.

Describe the solution you'd like
An extension to the fhir-persistence-schema CLI tool.

Describe alternatives you've considered
Manually query the database each time the information is required, but this is not desirable in a production environment. Also, the queries to collect this data will be very different for PostgreSQL and Db2, so it would be useful to hide this complexity in a tool.

Acceptance Criteria

  1. GIVEN a PostgreSQL with the FHIR schema deployed
    WHEN the schema-tool is run using the --show-db-size option
    THEN a summary report is written to stdout.

  2. GIVEN a PostgreSQL with the FHIR schema
    WHEN the schema-tool is run using the --show-db-size option
    AND the --show-db-size-detail option is included
    THEN both summary and detailed reports are written to stdout

  3. GIVEN a Db2 with the FHIR schema deployed
    WHEN the schema-tool is run using the --show-db-size option
    AND a schema name is provided
    AND a tenant name is provided
    THEN a summary report is written to stdout.

  4. GIVEN a Db2 with the FHIR schema
    WHEN the schema-tool is run using the --show-db-size option
    AND a schema name is provided
    AND a tenant name is provided
    AND the --show-db-size-detail option is included
    THEN both summary and detailed reports are written to stdout

Additional context
Possibly also include machine-readable output so that the tool can be used to provide metrics to a performance management solution. (*) now supported using the --show-db-size-detail option.

@punktilious punktilious added the enhancement New feature or request label Jan 20, 2022
@punktilious punktilious self-assigned this Jan 20, 2022
punktilious added a commit that referenced this issue Jan 27, 2022
Signed-off-by: Robin Arnold <robin.arnold@ibm.com>
punktilious added a commit that referenced this issue Feb 1, 2022
…nalysis

Signed-off-by: Robin Arnold <robin.arnold@ibm.com>
punktilious added a commit that referenced this issue Feb 4, 2022
Signed-off-by: Robin Arnold <robin.arnold@ibm.com>
punktilious added a commit that referenced this issue Feb 4, 2022
Issue #3217 new db size report option in schema tool
@kmbarton423
Copy link
Contributor

Confirmed expected behavior with both postgres and db2:

java -jar ./fhir-persistence-schema-4.11.0-SNAPSHOT-cli.jar --prop-file C:\KMBspace\aFHIR\docker\postgresql.properties --schema-name fhirdata --db-type postgresql --show-db-size
java -jar ./fhir-persistence-schema-4.11.0-SNAPSHOT-cli.jar --prop-file C:\KMBspace\aFHIR\docker\postgresql.properties --schema-name fhirdata --db-type postgresql --show-db-size --show-db-size-detail

java -jar ./fhir-persistence-schema-4.11.0-SNAPSHOT-cli.jar --prop-file C:\KMBspace\aFHIR\docker\db2.properties --tenant-name default --schema-name FHIRDATA --db-type db2 --show-db-size
java -jar ./fhir-persistence-schema-4.11.0-SNAPSHOT-cli.jar --prop-file C:\KMBspace\aFHIR\docker\db2.properties --tenant-name default --schema-name FHIRDATA --db-type db2 --show-db-size --show-db-size-detail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants