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

mikgigs posted 5 years ago in General
I have experienced a strange bug when pressing the order field buttons on the results
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 posted 5 years ago
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?
mikgigs posted 5 years ago
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 posted 5 years ago
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.
ansgar posted 5 years ago
Done in r3660.

mikgigs posted 5 years ago
Woow it works very good, just tested this build.
rashlin posted 4 years ago
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 posted 4 years ago
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.
mikgigs posted 4 years ago
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 posted 4 years ago
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.