schemainspect
schemainspect copied to clipboard
Uploading entire database schemas instead of single needed schema.
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.
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.