[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: How to profile SQR code?



You need to identify the delay points.  Put a time display before each
begin-select, within the select, and after the end-select, of every
paragraph.  Then you can see where the problem is.  If the delay is from
the first display to the second one, the problem is with the way the WHERE
clause is structured.  You may not be using indices properly.  If the
problem is between lines within the select, its something in one of the
paragraphs called from the main loop.  If the problem is at the end then
something you are doing after the select is the problem.

Your SQR.LOG will show all the displays.

At 09:54 AM 10/13/98 -0400, you wrote:
>How do I go about profiling a piece of SQR code?
>I want to see whats taking so long.  I have a program which takes 2 hours to
>run.
>It produces seperate reports for around ~800 people, and the time has gone
>up
>as the number of reports it has to produce has gone up.  I'm pretty
>confident
>that the queries are all ok, but I'd like to know for sure.
>
>The real problem is that I have to run the sqr report multiple times because
>of
>formating and where clause constraints, so its actually taking 6 hours every
>night.
>
>Fred Schiff (fschiff@nlfs.com)
>212/354-8800 x250
>Nathan & Lewis Securities, Inc.