If you are going to test an external command the performs disk access then you need to execute it once in advance and discard the results of that execute. Otherwise the elapsed time will be significantly higher for the first execute (regardless of how so executed) because of the disk access necessary to bring the data in to the cache. You can see this by reversing the order of two executes vs one execute.
The overhead of spawning a process depends on what operating system you are using and what version of jBASE you are using. The overhead gets smaller as the jBASE release number gets bigger :-) In general though you should not execute programs that perform disk IO in order to measure the performance of the EXECUTE statement. Just EXECUTE "SLEEP 10" or something like that and you can determine the overhead of process creation. Jim > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Kiran > Sent: Tuesday, February 09, 2010 7:52 PM > To: jBASE > Subject: [SPAM] Re: Execute > > Hi Igor, > > Sorry for the late response to this. I have tested this by running > couple of times, and all the times I have a difference. I have tested > it using a select on two files. And there has been considerable > difference in time all the times. The results are as follows: > > First Case: with two executes > 33122893 > 33123513 > 620 > > Second Case: with single execute > 33123513 > 33123621 > 108 > > When I perform an EXECUTE as I understand it spawns a new jshell and > in that it executes the command. Is the time difference because of > single exeucte statement meaning one shell instance being spawned and > executing both the commands in the later case? Or something else? > > Like Jim said, it purely depends on the type of the command which is > being executed. But just wanted to understand the difference in > times. > > Thanks, > Kiran. > > On Jan 23, 12:54 am, Igor Micev <[email protected]> wrote: > > Hi, > > > > T1 = SYSTEM(12) > > EXECUTE 1 > > T2 = SYSTEM(12) > > DIFF1 = T2 - T1 > > > > T3 = SYSTEM(12) > > EXECUTE 2 > > T4 = SYSTEM(12) > > DIFF2 = T4 - T3 > > > > IF DIFF1 > DIFF2 THEN 1 > > END ELSE 2 > > > > and pls share the results with us :) > > > > Regards > > IM > > > > > > > > > > > > On Fri, Jan 22, 2010 at 5:04 AM, Kiran <[email protected]> > wrote: > > > Hi Viewer, > > > > > I have to execute two commands using EXECUTE. Which is the more > > > efficient way of doing it? > > > > > 1. EXECUTE CMD1 > > > EXECUTE CMD2 > > > > > 2. Y.CMD = CMD1 : @FM : CMD2 > > > EXECUTE Y.CMD > > > > > Thanks, > > > Kiran. > > > > > -- > > > Please read the posting guidelines at: > > >http://groups.google.com/group/jBASE/web/Posting%20Guidelines > > > > > IMPORTANT: Type T24: at the start of the subject line for questions > > > specific to Globus/T24 > > > > > To post, send email to [email protected] > > > To unsubscribe, send email to [email protected] > > > For more options, visit this group at > > >http://groups.google.com/group/jBASE?hl=en > > > > -- > > Igor Micev- Hide quoted text - > > > > - Show quoted text - > > -- > Please read the posting guidelines at: > http://groups.google.com/group/jBASE/web/Posting%20Guidelines > > IMPORTANT: Type T24: at the start of the subject line for questions > specific to Globus/T24 > > To post, send email to [email protected] > To unsubscribe, send email to [email protected] > For more options, visit this group at > http://groups.google.com/group/jBASE?hl=en -- Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
