Also, keep in mind - and I'm speculating a bit here on your process - if
you have just 6 individual queries that run in a single threaded, linear
fashion and they take 6 minutes to execute, running them all concurrently
may take just as long as it's sounds like your DB server may be taxed or
these are really heavy queries.

Again, speculating here - it could be that you might benefit from some
other options:

1. Maybe some DB tuning or having a DBA look at the SQL being executed to
speed them up.
2. Maybe this isn't meant to be an on-demand process - as Dave rightly
suggested, you could either batch them in the back ground - on-demand or
you schedule them outright and have them delivered when ready and only run
them once a ______
 - Obviously, the feasibility of either option is dependent on the process
and use cases themselves.


HTH


On Tue, May 21, 2013 at 7:10 AM, Dave Watts <dwa...@figleaf.com> wrote:

>
> > We have processes that assemble reports from as many as 6 individual
> queries. Currently the queries run sequentially so the
> > related report cannot be assembled and displayed until after all queries
> have completed. Users often have to wait several
> > minutes for their report. They are not happy about that.
> >
> > We are considering trying cfthread to run queries concurrently and then
> assemble and display the related report after the longest
> > running query completes.
> >
> > Is this a viable use for cfthread or is it meant to be used for
> unrelated processes?
> >
> > Is anyone using cfthread as described above? Have you seen noticeable
> improvement in performance? Is the cost in complexity
> > of the code worth the improvement in performance?
>
> Yes, that sort of parallel processing is a common use case for
> CFTHREAD, and it will improve performance for that user's request. Of
> course, it typically also means you can't process as many user
> requests simultaneously - it's not magic - but if that's not a problem
> then you should be all set.
>
> Alternatively, you could use a single CFTHREAD that does all the work,
> and the user could do something else instead of waiting for the report
> at all - for example, the CFTHREAD could generate an email with a link
> to the report.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> http://training.figleaf.com/
>
> Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
> GSA Schedule, and provides the highest caliber vendor-authorized
> instruction at our training centers, online, or onsite.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355814
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to