Searching has become incredibly slow

chrisell's profile image chrisell posted 9 months ago in General Permalink

Disclaimer: for YEARS I have been using Heidi 9.5_64 and finally this week I let it update to a more current version 12.11.0.7065.

In the old version, I would open a table, 'show all' and be able to see (for example) all 7000 lines in a table. I would then Ctrl-F, input the text to search for, and the search would complete instantly and jump straight to the line in the table.

With the current version, I now see thousands of commands being sent in the console and to search 7000 lines takes minutes to complete, especially if the thing I'm searching for turns out to be the very last entry in the table.

I'm not super familiar with SQL which is why I use Heidi to help manage and search my tables. So I'm not sure why the old version could search for text almost instantaneously and the new version seems to be connecting to the server and sending individual commands thousands of times over.

For example when I CTRL-F and search for "XXXXX-EYHWKKK3-7PAEP2X", in the old version it would jump straight there. In the new version I get these commands showing up (edited so as not to show my ACTUAL key codes in the datbase, obviously):

SELECT 'SKU', 'KEYCODE', 'ACTIVATIONS', 'DISABLED', 'SHOP', 'COMMENT' FROM 'xxxxxx'.'sgm' WHERE 'KEYCODE'='XXXXX-D7HUCKW3-GXYH625';

SELECT 'SKU', 'KEYCODE', 'ACTIVATIONS', 'DISABLED', 'SHOP', 'COMMENT' FROM 'xxxxxx'.'sgm' WHERE 'KEYCODE'='XXXXX-FMPZW7RU-JLACV2S';

SELECT 'SKU', 'KEYCODE', 'ACTIVATIONS', 'DISABLED', 'SHOP', 'COMMENT' FROM 'xxxxxx'.'sgm' WHERE 'KEYCODE'='XXXXX-C3HS1KSU-HTA762S';

SELECT 'SKU', 'KEYCODE', 'ACTIVATIONS', 'DISABLED', 'SHOP', 'COMMENT' FROM 'xxxxxx'.'sgm' WHERE 'KEYCODE'='XXXXX-EYHWKKK3-7PAEP2X';

It seems like CTRL-F should only be sending this command?:

SELECT 'SKU', 'KEYCODE', 'ACTIVATIONS', 'DISABLED', 'SHOP', 'COMMENT' FROM 'xxxxxx'.'sgm' WHERE 'KEYCODE'='XXXXX-EYHWKKK3-7PAEP2X';

But it's like it's sending select commands for every single line in the database and only stopping when it finds the text that matches. I don't really understand how or why it's doing this but the difference to the very old version is very noticable in speed. I have some databases with 15,000 lines and if the item I'm searching for is the very last line, it can take 20 to 25 minutes to complete, where the old version would find that last line instantly.

chrisell's profile image chrisell posted 9 months ago Permalink

Quick followup - it seems like the old version searched what was visible in the data table window, and the new version ignores that and goes to the server with thousands of queries instead. So I guess my question is "how do I get it to revert to searching for text in the visible data window" ?

chrisell's profile image chrisell posted 9 months ago Permalink

Followup 2: I had a more recent version 12.0.0.6468 where this problem also did not exist - searching in that version is still lightning quick.

ansgar's profile image ansgar posted 9 months ago Permalink

What you encounter in older versions was probably an incomplete search result. The data grid shows the first 256 chars of text and blob columns only, and newer versions auto-load their full contents for the search.

For such searches it's highly recommended to use a WHERE filter instead.

Related:

ansgar's profile image ansgar posted 9 months ago Permalink

Alternatively, you may use the filter panel (Edit > Filter panel (Ctrl Alt F), which still does a search over loaded content:

image description

chrisell's profile image chrisell posted 9 months ago Permalink

Oh wow. I've been using HeidiSQL for years and never even noticed the filter panel. That does exactly what I was looking for. Thank you !!

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