| 
      
      
      From: Chris W. <ch...@cw...> - 2002-02-28 03:22:45
      
     | 
| On Wed, 2002-02-27 at 16:37, Chris McDaniel wrote: > I have a particular action within a package I wrote that tends to drive > server load up (quite a bit) every time it is run. Just wondering about the > best way to determine what exactly is going on. I have DEBUG => 5 in all my > queries, but I don't see anything out of the ordinary. > > Note that I am using iterators wherever possible and also that the ping_log > table referenced below has > 70000 records. > > This is the log of a single run of the procedure - > ... What happens when you take these queries and run them in a separate script? They don't seem very unusual, so the only thing I can think of database-wise is to ensure the fields you're searching (customer_id in monitored_hosts and monitored_host_id in ping_log) are indexed by themselves, as opposed to being part of an index with more fields. Also, if you're using the CommonHandler routine and/or getting paged results back, you might want to check the overflow directory ($WEBSITE_DIR/overflow) to see if you've got a bazillion files in there. Many filesystems suffer dramatic slowdowns when you stick a few thousand files in a single directory. If that's your problem, there's a script pkg/results_manage-x.xx/script/clean_results.pl that you can run which will cleanup any results older than 30 minutes. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |