A
Adam Smith
Hello. I have a datagrid control on an asp.net web page with a sort
command. I notice when the sort is ascending, the page renders very
fast, but when the query is descending it is very slow, sometimes 30
seconds or more.
This doesn't make any sense because the query run by itself is only less
than 1 second. Stepping through it in the debugger, the query itself
doesn't even seem to be the problem, it just seems to take a long time
to go from my oninit to page_load.
I hope that I'm not being too brief in my description and evidence of
the problem, but I'm just wondering if there's a leak somewhere-my code
does the same execution path in descending and ascending, even if the
sort command is repeated. And if its repeated, again the ascending is
fine, the descending is slow. So is there something I don't know about
the datagrid?
Any tips to optimize?
Thanks in advance.
command. I notice when the sort is ascending, the page renders very
fast, but when the query is descending it is very slow, sometimes 30
seconds or more.
This doesn't make any sense because the query run by itself is only less
than 1 second. Stepping through it in the debugger, the query itself
doesn't even seem to be the problem, it just seems to take a long time
to go from my oninit to page_load.
I hope that I'm not being too brief in my description and evidence of
the problem, but I'm just wondering if there's a leak somewhere-my code
does the same execution path in descending and ascending, even if the
sort command is repeated. And if its repeated, again the ascending is
fine, the descending is slow. So is there something I don't know about
the datagrid?
Any tips to optimize?
Thanks in advance.