bug: sort option buttons in results are making the program not responding

[expired user #4382]'s profile image [expired user #4382] posted 13 years ago in General Permalink
Hi,
I have experienced a strange bug when pressing the order field buttons on the results
Experience:
table - 60 000 rows,
fields -> 30 Varchar(40), 2 varchar(3000)
key -> varchar(40) unique
select * from table; then pressing any of the sorting buttons...will result in that behaviour.

Well, i am seldom using those, but sometimes you can press by mistake when rolling up/down the sliders or copy values from fields.

Thank you
ansgar's profile image ansgar posted 13 years ago Permalink
I'm lazy. And I don't have such an exact table you describe above. So, could you describe what's exactly the effect you see then?
[expired user #4382]'s profile image [expired user #4382] posted 13 years ago Permalink
well, actually not a bug, but symptoms are that the program
is not responding....stucking for hours...(with "not responding" status in windows application manager)
and "Sorting Grid Nodes..." status in the program status..

I checked with smaller number of rows and realized that the time needed for sorting increases exponentially, and somewhere about 20 000 rows starts to acquire those issues. Just for details, my table has three types of collations and 3 different character sets (it's a multiple language dictionary table), but i assume that it is just some memory-related behaviour.
Table Size - 15 mb.
ansgar's profile image ansgar posted 13 years ago Permalink
Yes that's indeed ugly that there is no way to stop such operations. Think I'll add a "Cancel" button to the main toolbar, which we can reuse for other cases as well.
Code modification/commit from ansgar.becker, 13 years ago, revision 6.0.0.3660
Add a "Cancel" button to the main toolbar, so users are able to stop long running query grid sort operations. See http://www.heidisql.com/forum.php?t=7674
ansgar's profile image ansgar posted 13 years ago Permalink
Done in r3660.
[expired user #4382]'s profile image [expired user #4382] posted 13 years ago Permalink
Woow it works very good, just tested this build.
[expired user #3482]'s profile image [expired user #3482] posted 13 years ago Permalink
i'm unable to use it in r3662, i see the button but it is grayed out(when running a big query) and its not responding...
did something changed in r3662?
ansgar's profile image ansgar posted 13 years ago Permalink
Yes, it's disabled when you run a big query. That was not the topic here - mikgigs wrote about sorting via header click. However, at some point I will make the new button usable for cancelling long running queries as well.
[expired user #4382]'s profile image [expired user #4382] posted 13 years ago Permalink
I agree with that, everything is okay now. I have browsed your code to see, whether I can also try to help to resolve sorting, well I have forgotten how to program in Pascal/Delphi since my secondary school, and it seems that sorting is based by the internal methods of the grid control. My suggestion is to use the MySQL for sorting(it should be fastest possible approach), instead of doing it by Delphi controls. So, just sending the fetched data in mysql back by stored procedure, creating a table/view, select * , adding "order by" clause at the end and then get the result back.
ansgar's profile image ansgar posted 13 years ago Permalink
Quite a lot of effort just for sorting by click, is it? You know, the user can always sort by writing the ORDER BY clause himself - which is not the baddest thing.

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