RE: Multi processors question
Posted in 2000
From the admin guide chapter on PDQ:
--
Correlated and Uncorrelated Subqueries
The database server does not use PDQ to process correlated subqueries. Only
one thread at a time can execute a correlated subquery. While one thread
executes a correlated subquery, other threads that request to execute the
subquery are blocked until the first one completes.
For uncorrelated subqueries, only the first thread that makes the request
actually executes the subquery. Other threads simply use the results of the
subquery and can do so in parallel.
As a consequence, Informix strongly recommends that, whenever possible,
you build your queries using joins rather than subqueries so that your
queries can take advantage of PDQ.
--
I am pretty sure this is what you are seeing.
I can't think of much you can do for a work around, maybe someone
else has a good idea...
Will
>===== Original Message From "Bashar Chalabi" <bashar@ctl.com> =====
>Hello list,
>
>IDS7.31 on NT4 with dual processors:
>
>I have a table fragmented round robin in 2 fragments.
>
>
>If I do:
>
>Update Table1 set Col1 = Col2>
>I get 100% utilisation on both processors and parallel access to both
>fragments.
>
>But, if I do:
>
>Update Table1 set Col1 = (Select Col2 from Table2 where Table2.PrimaryID =
>Table1.ForeignID)>
>it uses only one processor, and accesses the fragments serially. It does
>create 2 threads, but they never seem to run at the same time.
>
>Table 2 is much smaller, and ends up residing in buffers.
>
>There is a referential integrity constraint between the tables.
>
>The question is: Can the second update statement use parallel processing? If
>yes, what is required.
>
>Thanks
>
>--
>Bashar Chalabi
>CTL, London