distal-attribute
distal-attribute
distal-attribute
distal-attribute

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

User, date Message
Written by mikgigs
3 years ago
Category: General
21 posts since Mon, 12 Oct 09
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
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
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?
Written by mikgigs
3 years ago
21 posts since Mon, 12 Oct 09
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.
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
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.
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
Done in r3660.
Written by mikgigs
3 years ago
21 posts since Mon, 12 Oct 09
Woow it works very good, just tested this build.
Written by rashlin
3 years ago
13 posts since Wed, 14 May 08
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?
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
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.
Written by mikgigs
3 years ago
21 posts since Mon, 12 Oct 09
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.
Written by ansgar
3 years ago
4784 posts since Fri, 07 Apr 06
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.