Queuing is not always an appropriate way to improve throughput. Queuing is usually appropriate only when an event occurs during a process, and the process does not care about the result of the event. Logging a message is a perfect example, where a process fires off the logging event, but the rest of the process does not depend on the result of writing that message to the log. In that case, any time spent waiting around for the log message to be written is wasted, and is best pushed off to the other side of the queue.

However, a process that makes a call to a database and returns the results to the user is not a good candidate for queuing. In that case, the process depends on the result of the operation, and must wait for the operation to occur.

Here are two good rules of thumb for deciding if an operation is a good candidate for queuing:

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices