Skip to content

Fix performance problems in the database#22

Merged
baltpeter merged 4 commits into
mainfrom
z_fix_edgedb
Jan 14, 2025
Merged

Fix performance problems in the database#22
baltpeter merged 4 commits into
mainfrom
z_fix_edgedb

Conversation

@zner0L

@zner0L zner0L commented Dec 6, 2024

Copy link
Copy Markdown
Contributor

This is based on migrations from #15, which needs to be merged first.

I managed to significantly reduce the time required to SELECT by caching the state and changing it only on INSERT or UPDATE. On my local machine, a query like

SELECT Proceeding {*, initialAnalysis: {*}, secondAnalysis: {*}, app: {*}, uploads: {*}};

selecting all 18 Proceedings and all of their links takes 84 ms according to ANALYZE. The RAM requirements of the database also stay reasonable.

The custom migrations should also preserve the current state of the database.

Comment thread src/pages/a/[platform]/[appId]/index.astro
Comment thread src/pages/p/[platform]/[appId]/index.ts Outdated
Comment thread dbschema/default.esdl
@zner0L zner0L requested a review from baltpeter January 2, 2025 18:12

@baltpeter baltpeter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed it. thumbsup

Comment thread src/pages/a/index.astro
Comment thread dbschema/default.esdl Outdated
@zner0L

zner0L commented Jan 13, 2025

Copy link
Copy Markdown
Contributor Author

This is now properly rebased to main and ready to merge IMO. Do you still have something holding it up, @baltpeter?

@baltpeter baltpeter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.

@baltpeter baltpeter merged commit 148fc3e into main Jan 14, 2025
@baltpeter baltpeter deleted the z_fix_edgedb branch January 14, 2025 10:59

@hgeet hgeet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update

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.

3 participants