Re: Cpu usage of stored procedures
Date: 08-02-10
From: psmith <psmith_at_tseint.com>
Kevin,
Thanks for the input.
4D Server is the only thing running on this very fast machine. The job
runs at night, when there are no clients connected. The first five or
six nights we ran it, it was faster on the server than on the client
side. Since last Monday we noticed it had started running very slowly,
although the code and the number of records handled have not changed.
It seems as if, for some reason, the stored procedure is not given
enough cpu time to do its job.
On a "client" machine it is very fast, creating about 300 records a
second or more. On the server side, the same method only creates about
8 or 10 records a second, making it at least 30 times slower than the
same method running on a client machine.
The problematic method loops through arrays, creating records in a
given table, assigning values to fields, then storing the records -
one at a time ( I know Array to selection would be faster but it still
doesn't explain the slowdown on the server). It appears that Create
record and Save record are taking most of the time in the method.
Strange.
Paul Smith
TSE International
> What commands are you calling within it?
>
> This could have something to do with it terms of 4D internal
> scheduling.
>
> Odd though if nothing else is running on the box at the same time.
>
> Have you tried calling the method code outside of the stored
> procedure to see how fast it is?
>
> -Kevin
**********************************************************************
The New 4D Partner Program - All the tools you need to be a successful 4D Developer.
Sign up Now: http://www.4d.com/community/partner/registration.html
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe_at_lists.4D.com
**********************************************************************