Re: Parallel Query Execution !
Posted in 1997
Alexander Selg wrote: > > Hello ! > > I had the same problem and I used fork to create childs which access the > same table (no problem). > What I also would like to do is to create threads which to the work in > parallel. With Informix 7.2 Informix supports threads if you use the DCE > Thread-Package. > But there is one problem (it's only one little sentence in the ESQL/C > Programers Manual): You can have one active connection per thread (that > means every thread can be ready to start his SQL-requests), but only > _ONE_ thread at a time can have the current connection (that's the > connection that is currently sending SQL requests to the database server > and possibly receiving data from the database server). > I am very sorry about this because that means you cannot receive data in > parallel when you use threads --> no run time improvements (except of > preparing anything you need befor you use the active connection). > Uhmm, Hate to nitpick, but a thread is different from a fork. A thread is a light weight process which shares an image of the parent. A fork copies the parents memory segement as its own and then continues. And, if you want to, you could have a parent create a child and have each child create a db instance. There are more than one way to skin the cat so to speak. Also, consider that, AFAIK, DCE is an add on package which is not shipped with standard HP, or their C development product. (I could be wrong though...) An interesting side question. On an SMP machine, which is faster a threaded process or a forked process? ;-) -HTH Mikey. -- #include <std_disclaimer.h> /* Mike Segel (MS385) */ #include <No_Spam.h> #ifdef OFFENDED_BY_CONTENT The author takes no responsibility for this post. Any resemblence to a coherent rational thought is purely coincidence. -The Management. #endif ***************************** Due to AGIS's Refusal to Act Responsibly We are blocking all of their domains at the packet level. This block will exist until AGIS modifies their policies to conform to existing RFCs and net community standards. We encourage all ISPs and domain holders to do the same. *****************************