Re: Cpu usage of stored procedures
Date: 08-02-10
From: Bryan Green <bryan_at_greensw.com>
On Feb 7, 2010, at 11:15 PM, psmith wrote:
> 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.
Try calling FLUSH BUFFERS every 10 SAVE RECORDS or so. The slowdown sounds like the cache is becoming full, which "shouldn't" be slow but perhaps is. The FLUSH BUFFERS will mitigate that.
-- bag**********************************************************************
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
**********************************************************************