Re: Parallel Query Execution !
Posted in 1997
Mike Segel wrote: > > 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. > -- Of course threads are different from forked childs. But like a child can create a db instance a thread can also create it's own db instance; and so I thought every thread can communicate with the ODS without dependences on each other. We also had to buy our own DCE package. bye, Alexander Selg -- ------------------------------------------------------------------- Alexander Selg | e-mail: alexander.selg@siemens.at Siemens AG Austria | Tel.: +43 1 1707-45960 A-1101 Wien, Gudrunstr. 11 | Fax.: +43 1 1707-55832 -------------------------------------------------------------------