opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.51k stars 827 forks source link

Poor Performance when inspecting SQL Database with many tables #247

Closed nlowe closed 6 years ago

nlowe commented 7 years ago

The databases our primary application uses has just over 3000 tables. When looking at the database in OpServer, the loading animation is played for a few minutes. Eventually I get a warning that the chrome tab is unresponsive. If I wait a few more minutes, the view is populated with all tables. Scrolling is slow and the view is almost unusable.

Even for an almost empty database (52mb data, 21mb logs), the view takes over 60 seconds to load.

Is there a way to separate tables into pages or only load a subset of the table data?

NickCraver commented 7 years ago

@nlowe please give latest a try, it's not awesome, but it should be far better. To get this working smoothly, I'll have to fetch the columns async per-table for these crazy cases (for most databases it's fine as-is), so that's a totally new code path and UI handling.

See if the current performance works in the interim, it should be substantially improved for the large database case.

nlowe commented 7 years ago

@NickCraver Loading the view does seem much faster with latest overhaul, but it still slows the chrome tab to a crawl while the view is open as expected.

I agree that this is most definitely an obscure edge case, just wanted to make sure you were aware of it. Thanks for the tips.

NickCraver commented 6 years ago

Going to close this out as I think it's the best we can reasonably do here :)