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

performance: Use CONSTRUCT query for dimension values metadata #1218

Closed

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Oct 13, 2023

This PR aims at improving the performance of dimension values fetching by replacing several SELECT queries with one CONSTRUCT query.

Observations

I compared the performance of the old and new way of fetching and included the results below. I based these measurements on four datasets:

  • Einmalvergütung für Photovoltaikanlagen,
  • Gebäudeprogramm - CO2-Wirkungen je Massnahmenbereich,
  • State accounts - Function,
  • NFI: Topics by stage of stand development,

opening each one in the editing mode and triggering fetching of dimension metadata values the same number of times for each dataset.


Key Value
Number of queries 510
Avg. time SELECT 242ms
Avg. time CONSTRUCT 249ms (+3%)

I've also removed the conditions to limit inclusion of some properties based on scale type, as I am not 100% sure if they are needed anymore (e.g. if dimension values description can really only be present when scale type is either ordinal or nominal). Also, when they were added to the data, I think it makes sense to include them even when scale type is mapped wrongly. When they were removed, the performance of CONSTRUCT queries based on 406 new queries was better than SELECT queries by 0.04%.

cc @adintegra @Rdataflow

@vercel
Copy link

vercel bot commented Oct 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 0:58am

@bprusinowski bprusinowski force-pushed the performance/construct-for-dimension-values-metadata branch from cce6a7b to 86c3e37 Compare October 18, 2023 11:08
...useful when measuring performance.
@bprusinowski
Copy link
Collaborator Author

Closed in favor of #1378.

@bprusinowski bprusinowski deleted the performance/construct-for-dimension-values-metadata branch March 25, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant