I have noticed that refreshing the left object tree unnecessarily queries the server about databases that I have looked at before but now are hidden (collapsed). For example, I open a connection, expand database A, then B, then C, then I'm not interested in B and C anymore so I collapse them and I'm looking at tables from database A. Now when I press the refresh button Heidi queries for information about A, B, and C even though B and C are hidden. This can lead to a long list of queries that take time and decrease performance. For example, this can happen when only table6 is expanded:
SHOW TABLE STATUS FROM `table1`;
SHOW FUNCTION STATUS WHERE `Db`='table1';
SHOW PROCEDURE STATUS WHERE `Db`='table1';
SHOW TRIGGERS FROM `table1`;
SHOW TABLE STATUS FROM `table2`;
SHOW FUNCTION STATUS WHERE `Db`='table2';
SHOW PROCEDURE STATUS WHERE `Db`='table2';
SHOW TRIGGERS FROM `table2`;
SHOW TABLE STATUS FROM `table3`;
SHOW FUNCTION STATUS WHERE `Db`='table3';
SHOW PROCEDURE STATUS WHERE `Db`='table3';
SHOW TRIGGERS FROM `table3`;
SHOW TABLE STATUS FROM `table4`;
SHOW FUNCTION STATUS WHERE `Db`='table4';
SHOW PROCEDURE STATUS WHERE `Db`='table4';
SHOW TRIGGERS FROM `table4`;
SHOW TABLE STATUS FROM `table5`;
SHOW FUNCTION STATUS WHERE `Db`='table5';
SHOW PROCEDURE STATUS WHERE `Db`='table5';
SHOW TRIGGERS FROM `table5`;
SHOW TABLE STATUS FROM `table6`;
SHOW FUNCTION STATUS WHERE `Db`='table6';
SHOW PROCEDURE STATUS WHERE `Db`='table6';
SHOW TRIGGERS FROM `table6`;
SHOW TABLE STATUS FROM `table7`;
SHOW FUNCTION STATUS WHERE `Db`='table7';
SHOW PROCEDURE STATUS WHERE `Db`='table7';
SHOW TRIGGERS FROM `table7`;
SHOW DATABASES;
SHOW CREATE TABLE `table6`.`blog`;
Is this behaviour intentional? I would certainly prefer that only the currently expanded databases be queried. A workaround is to open a new window with the same connection and close the old one to clear the list of remembered databases, but that is a hassle. What do you think?
Refreshing tree can issue a very long list of queries
I think databases shouldn't get collapsed when I do a refresh, I would expect the view to stay unchanged - only refreshed. And it's fine for me when multiple databases are refetched as long as they are expanded. It's just that I don't want Heidi to refetch databases that are collapsed.
Code modification/commit
e43d115
from ansgar.becker,
14 years ago,
revision 6.0.0.3762
Update cached objects only for current and expanded database nodes when refreshing. No need to do that also for all previously selected databases. See http://www.heidisql.com/forum.php?t=6773
Thanks, it's working very well from what I can see. No crashes so far but I'll report if there are any.
There's only one small glitch, I don't know if it's related to refreshing - very often when I click on table names in the tree they don't get fully selected - the highlight colour is different (looks like disabled or unfocused item highlight) and the refresh button doesn't work. I have to wait a second and click again, then the table becomes fully selected and the refresh button works.
There's only one small glitch, I don't know if it's related to refreshing - very often when I click on table names in the tree they don't get fully selected - the highlight colour is different (looks like disabled or unfocused item highlight) and the refresh button doesn't work. I have to wait a second and click again, then the table becomes fully selected and the refresh button works.
Yes, it becomes unfocused and the focus goes to the name input box. So it looks like intentional behaviour? It's a bit weird to me that the focus goes away to a place I didn't click on. But it's a small issue for me so I don't mind it so much.
BTW, where are the older forum posts? I can see only one page of posts without any navigation to older pages.
BTW, where are the older forum posts? I can see only one page of posts without any navigation to older pages.
Older posts are only searchable, not browsable hereMy forum is homebrown and minimalistic. But most old posts can be found via Google.
The stealing focus thing was a feature request, see issue #2289. Feel free to leave a comment there.
The stealing focus thing was a feature request, see issue #2289. Feel free to leave a comment there.
Please login to leave a reply, or register at first.