Steve, I have a few that I've been running for a long time. #1 is a method that manages sending emails. Emails created by users and the system go into a que and then are sent by the server. The method just sits and runs every few minutes. Another one runs every few minutes to update the current sales totals that live in arrays in the server process. Client machines grab the data from there if they are interested. Some guys will stay up until midnight on the end of the month to get a screenshot of themselves on top.
I've got a number of other house keeping kind of methods that run at various times. These are controlled by another stored method that wakes up every few minutes and checks to see if there are any methods to run. This makes it easy to schedule things that I want to run in off times or on schedules like once a week or so. But you have a point about some stored methods bogging things down. Reading email turned out to be one. So much so I just moved those operations to a separate database. It just runs every few minutes and checks if there are emails to download, does so if there are, unpacks the attachments and such and puts it all in a watched folder for the main db to read in via a stored method over there. Uploading to AWS in bulk also turned out to be a bottleneck so I put that into the email database as well. This has the happy effect of moving that processing to a different core as well though that's becoming less of a thing. User's aren't impacted if they run slowly. I am a big fan of Execute on server as well but that's a different animal. On Wed, Sep 13, 2017 at 1:38 PM, Stephen J. Orth via 4D_Tech < 4d_tech@lists.4d.com> wrote: > I've given up trying to write and use stored procedures, the Server is > just too fragile. I'd be open to anyone telling me you can really use > stored procedures in a "hard core" way without completely killing all > connected users performance. > > For years now, with each new release of 4D, I've been patiently waiting > for my opportunity to really utilize the power of the server hardware our > Clients purchase. However, each new version I continue to find it is not > robust enough to really use stored procedures. > > -- Kirk Brooks San Francisco, CA ======================= *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************