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

Uploading entire database schemas instead of single needed schema. #70

Open
valterartur opened this issue Aug 16, 2021 · 1 comment
Open

Comments

@valterartur
Copy link

valterartur commented Aug 16, 2021

Hi!

Can you tell me if there is any serious reason to upload the entire database schemas metadata for inspector and then filter out it with one_schema method usage?

Cause at our project we have a database that can contain a lot of schemas and we're syncing it from time to time with your great project Migra that uses this inspector to discover database. As a result of big schemas amount inspector discovering the database was too long, up to 10 minutes for x_from and x_target each.

To resolve it I modified your SQL queries for fetching only one schema metadata instead of the entire database can it cause some problems for us? If no so what is the reason to discover the entire database?

Regards, Artur.

@djrobstep
Copy link
Owner

Hey, thanks for filing this issue.

It's interesting the inspection is taking so long - to be honest, you're the first person to make this complaint, I suspect you must have very unusually large database schemas that you're inspecting.

The reason schemainspect queries the whole database is really that it's simpler that way and mostly there's no reason not to because that's the usual use case, and it's pretty quick anyway.

Do you happen to know which if the inspection queries is taking a long time? Perhaps you could supply some more information about what structures in your schema (can be in just very general terms if you're worried about revealing details) and which inspection queries are taking time, and we can go from there in terms of figuring out how to improve the performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants