start app from the middle of the code

interwanderer

Newcomer
Joined
Apr 9, 2005
Messages
5
Location
sweden
Hello everyone,

I have made an application. a piece of this application takes a long time to execute(about 10 or 15 minutes). It is a terribly slow and big query.

I want to be able... to put some sort of a break point right after the query...
and then I want to be able to start the app from the breakpoint(with my dataset filled with data from the query). so that I would be able to change the code below the query.... and not loose time on the execution of it....

can anyone help ?

thx,
 
Firstly is there anyway to reduce the time of the query? Is there any particular bottleneck or reason why it takes so long?

Secondly you probably want to use either threading to execute the query in the background or an asynchronous delegate to acheive a similar result.
 
I could be wrong but I got the impression that interwanderer wanted to execute the query section of the code and essentially pause the state of the application allowing that to be used as a start point. Thus allowing them to work on the code performed afterwards and upon changing the code, restarting from just after the query. If this is the case then surely a seperate thread / background execution probably wouldn't help (as i'm assuming the code works with the results of the query).

As you say though a query taking that long does seem perculiar. If my assumptions of what they are trying to achieve is correct then I would have thought storing the results of the query to file would be the best option. Then the query code can be commented out, a quick section of code loading the results can be added and the rest of the code can be worked on. Alternatively hardcoding results to the query whould allow work on the code to continue without running the query everytime.
 
After re-reading the original I think you might be correct. If that is the case then go with Cag's idea of saving the results to a file rather than executing the query each time.
 
yes, that is what I mean...

I have also thought of putting the result in 1 table on a more performant database and test that way...
but I think you can give different values to variables during code execution. so recompilation of a piece of code would be nice to see aswell.
The reason it takes this long is because it is an old and slow database and very big. and i'm joining about 6 tables.


Cags said:
I could be wrong but I got the impression that interwanderer wanted to execute the query section of the code and essentially pause the state of the application allowing that to be used as a start point. Thus allowing them to work on the code performed afterwards and upon changing the code, restarting from just after the query. If this is the case then surely a seperate thread / background execution probably wouldn't help (as i'm assuming the code works with the results of the query).
QUOTE]
 
Back
Top