Re: Cpu usage of stored procedures
Date: 08-02-10
From: psmith <psmith_at_tseint.com>
Kevin,
Thanks. Yes, we rebooted and it had no effect. I thought it might be
the same thing too.
Strangely, it does seem to be something to do with this particular
method. It goes through arrays of pointers, creating records and using
the arrays of pointers to assign values to the appropriate fields. As
such, it's supposed to be generic - no actual table names or field
names, just arrays of pointers to them. It would actually be a good
candidate for a component.
I looked through the documentation about stored procedures and the "no-
nos" as to what cannot or should not be done. I'm ok with regards to
those rules.
Just as a test, I ran a stored procedure which loops through all
records in a table with 230,000 records. It takes about 1.5 seconds to
execute on this customer's server. That's the kind of performance I
like... I just can't figure out why this particular stored procedure
is so slow. I guess I'll have to do some code profiling.
Paul Smith
TSE International
> Have you tried rebooting the server to see if it speeds up again
> first run out afterwards or so?
>
> Maybe 4D's internal scheduler is up to something given that it's a
> stored procedure.
>
> Not sure if or why but It's a wild guess, may be worth verifying the
> idea.
>
> What Mac OS version are you running?
>
>
> -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
**********************************************************************