> Am 30.01.2016 um 04:21 schrieb Chuck Hill <[email protected]>:
> 
> OK, so it looks like you are doing single threaded processing.  That can 
> result in wait times, as I outlined below, even without DB or other resource 
> contention.    More instances can help to work around that, as can making 
> sure the app is thread safe and enabling multi-threading.  The latter is 
> considerably more work.
> 
> Another thing to consider: has this just started happening more without any 
> software changes?  That could be an indication that you are missing one or 
> more performance indexes on the database.  With single threaded dispatch, 
> even small differences can impact the users.  Have a look at 
> ERXAdaptorChannelDelegate.  You can set some properties and have it spit out 
> the SQL for anything that takes more than X milliseconds to execute.  Have a 
> look at those and see if adding one more indexes speeds things up.  

I don't know which RDBMS is used there, but with modern statistics based 
optimizers, RDBMS like PostgreSQL or Oracle can also show a sudden switch to a 
worse execution plan if the statistics no longer reflect the reality. Generally 
speaking, if the SQL optimizer thinks you'll hit more than 5% of the dataset 
anyway, it will opt for a full table scan and ignore the index, even if in 
reality the result set is only 1 row. This often happens when you have a highly 
skewed value distribution with more different values than the database keeps 
stats about.

You can use EOAdapterLog to get the SQL, then use the EXPLAIN PLAN feature to 
get the execution plan and determine whether or not an existing index is used. 
DB statistics must be kept up to date, and can be tweaked in many ways. If you 
think something like this is going on, consult your RDBMS documentation for 
details about how to show the stats and tweak them, or come back here and I can 
go in to more details in case of PostgreSQL or Oracle.

Maik

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to