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

Schema size report does not appear to correctly filter schemas #3949

Closed
punktilious opened this issue Sep 5, 2022 · 2 comments
Closed

Schema size report does not appear to correctly filter schemas #3949

punktilious opened this issue Sep 5, 2022 · 2 comments
Assignees
Labels
bug Something isn't working P2 Priority 2 - Should Have

Comments

@punktilious
Copy link
Collaborator

punktilious commented Sep 5, 2022

Describe the bug
When adding a second schema, the size report appeared to include the size of the first schema.

Environment
Which version of LinuxForHealth FHIR Server? 5.0.0-RC2

To Reproduce
Steps to reproduce the behavior:

  1. Create one schema with lots of data
  2. Create a second schema without much data
  3. Report the sizes of both, and notice that the size of the small schema is similar to the size of the large schema.

Expected behavior
The size report should accurately show the size of each schema

Additional context

Running the schema size report:

java -jar /path/to/fhir-persistence-schema/target/fhir-persistence-schema-*-cli.jar \
  --db-type postgresql \
  --prop-file fhiradmin.properties \
  --schema-name your-schema-name \
  --show-db-size \
  --show-db-size-detail
@punktilious punktilious added the bug Something isn't working label Sep 5, 2022
@lmsurpre lmsurpre added the P2 Priority 2 - Should Have label Sep 6, 2022
@lmsurpre
Copy link
Member

lmsurpre commented Sep 6, 2022

maybe tackle #3872 at the same time?

punktilious added a commit that referenced this issue Sep 8, 2022
…chemas

Signed-off-by: Robin Arnold <robin.arnold@ibm.com>
punktilious added a commit that referenced this issue Sep 8, 2022
issue #3949 fix schema size collection for PostgreSQL with multiple s…
@PrasannaHegde1
Copy link
Collaborator

Created the following 2 schemas.

  1. FHIRDATA with more data
  2. FHIRTESTDATA with less data
    After running the schema size report, got the below details.
Database Size Report
====================
        Date: 2022-10-12T17:42:11.262836Z
      Schema: FHIRDATA
     Db Size:     37150720 bytes
  Table Size:     14893056 bytes
  Index Size:     22257664 bytes


  Database Size Report
====================
        Date: 2022-10-12T19:47:43.009443Z
      Schema: FHIRTESTDATA
     Db Size:     10240000 bytes
  Table Size:       630784 bytes
  Index Size:      9609216 bytes

Now the size report accurately show the size of each schema. This is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Priority 2 - Should Have
Projects
None yet
Development

No branches or pull requests

3 participants