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

refactor(schema): add database filtering to JSON detection #2133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoreyWinkelmannPP
Copy link

Updated detectMariaDBJSON to accept dbName as a parameter, enabling filtering by CONSTRAINT_SCHEMA for more precise JSON constraint detection within specified databases.

The INFORMATION_SCHEMA tables, especially in production, can be a bottleneck if queried without constraints due to the high volume of metadata. By narrowing down the scope of JSON validation queries, we reduce potential load on INFORMATION_SCHEMA, improving efficiency and response times. This targeted approach allows for more precise schema capture while avoiding the pitfalls of exhaustive queries, especially in systems with many databases or tables.

@osheroff
Copy link
Collaborator

again, too much whitespace churn. does this really have a noticable impact on the database in a production system or is this kinda a theoretical win?

@CoreyWinkelmannPP
Copy link
Author

Sorry, I will stop my neovim from updating the whitespace on PRs. This affects our systems and we do need it. If we don't focus our queries to the information schema we do experience issues.

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.

2 participants