Database filter

energiesysteme posted 8 years ago in General

The database filter feature ("db1;db2") is very helpful.
I would like to know if we also can filter several tables in a database. For example, "db1.tbl*" or "db1.tbl1;db1.tbl2"

ansgar posted 8 years ago
You can filter tables, triggers etc. on the right "Database" tab, after clicking "Edit" > "Filter panel" (Ctrl+F). Only regular expressions and semicolon seperated items don't work here, it's a more simple "search" functionality, similar to a webbrowser's Ctrl+F feature.
energiesysteme posted 8 years ago
This feature allow us to filter the right panel content but not the tree on the left side. It can be great, that's right.

Unfortunately, it isn't very convenient if we want to swap from one table to another, we have to come back to this panel.
If the function was also available in the tree, I think I would be more useful.

Nevertheless, your way can be great.
Rapid-eraser posted 7 years ago
Is it possible for the database filter on the left side to specify an exact database and not a pattern ?

If i have 2 databases etc db1 and db1_backup , when I type in the box db1 or db1; both databases are shown is there any way to specify exactly the name ?
ansgar posted 7 years ago
Guess you're talking about the old tree filter which has moved to the session manager in the meantime. However, as that supported regular expressions, try a $ at the end: "db1$".
Rapid-eraser posted 7 years ago
Yes thanks that was what I was searching for.

I think the old tree filter was useful as it was (having regex and visible directly without opening any special menu.)
Plus I tried the latest build and if you type wrong the db name hell breaks lose smile

Thanks again for the help !!!
ansgar posted 7 years ago
I was against this change too, until more and more users asked for some compatibility to old servers which throw an error on SHOW DATABASES. So, for now, users have to specify dbs before connecting if wanted.
Rapid-eraser posted 7 years ago
Database filter shouldn't be server specific ?
I am opening 3-4 deferent sessions but databases names don't usually much and I have to retype again the filter.

(I think this changed in the recent updates and was working us described above)

PS: I got hard time to setup correctly ssh tunneling but no works like a charm !!! I am going to post my experiencesmile
zykara posted 7 years ago
Database filter is no longer saved within specific server sessions?

Please, please, move registry key 'DatabaseFilter' from root into Servers/??connection name??/ so session can use its own specific filter again.

It was very useful when you have 10+ servers.

P.S. We discussed it here: http://code.google.com/p/heidisql/issues/detail?id=1485#c29
ansgar posted 7 years ago
What we discussed was the absence of the filter box, not that the filter has a global relevance, which was introduced later, together with implementing multiple connections per window.

However, from a usability point of view it would be weird if the filter text would change each time you click nodes of different servers.

The filter supports regular expressions, so you should be able to phrase it in a way that all sessions are somehow matched the way you want. If that's also not possible, hell you should delete some of your databases :)
Rapid-eraser posted 7 years ago
I think this would be most useful for the filter to be session specific, if your hand hurts you don't cut off your hand happyhappyso deleting databases from the list is out of the question.

My problem is usually when remote databases have deferent name altogether with the local. My local server is a standard mysql installation but when trying to upload someone has cpanel other plesk other webmin ... everyone gets a deferent database name
and most times wont much local at all !!!
So i end up having a chain of 250 charters defining databases. Most of my projects have a replication so count at least 3 sessions, its not a pretty event to think of it :P
zykara posted 7 years ago
Nice recommendation happyI'll do it over all my servers happy

But seriously, I don't have same databases over all servers. In this case it would make sense what you wrote.

Many servers, different databases. Like different coloring session is VERY BIG useful thing, where my production servers have RED color, testing servers have Magenta color, local server is white... This is something, what stops you to accidentally delete a table from RED servers.

And similarly as colors, different filters in sessions should be back again, because no one always works with same databases on different servers.

And in that discussion is stated '... with regexp functionality and saved between sessions...", thats my point.
zykara posted 7 years ago
This was a reply to anse.
zykara posted 7 years ago
Another reason, why would be better to have different filters saved between sessions.
When you open an older connection, it is immediately filtered and you suddenly stare at empty database tree...

Please, there was session specific filters recently, I believe its a minor change in the code (hopefully), just as background color.... :O)
Rapid-eraser posted 7 years ago
Pleaseeeeeeeeeeeee pleaseeeeeeee :)

Please login to leave a reply, or register at first.