[Q] AD and XP Options? How to turn them on?
Posted in 2000
Topics: SQL Development & Query Writing, Server Administration
We would like to enable Informix to run this type of query:
update t set a = t2.a from t, t2 where t.b =t2.b
Accourding to the Informix Help, it says to have Dynamci Servier with AD and
XP options allows this type of update join.
Any Idea on how to turn this on?
We are running
Informix 7.3 TC3
Windows NT Server 4.0 SP3
Thanks for any feedback
Steve
Steven Wong wrote:
> We would like to enable Informix to run this type of query:
>
> update t set a = t2.a from t, t2 where t.b =t2.b>
> Accourding to the Informix Help, it says to have Dynamci Servier with AD and
> XP options allows this type of update join.
>
> Any Idea on how to turn this on?
>
> We are running
>
> Informix 7.3 TC3
> Windows NT Server 4.0 SP3
>
First you reformat your disk. The you install a real o/s -- Unix.
Then you install XPS (oops, IDS with ADSO and XPO).
End of problem.
AFAIK, there is no XPS for NT.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
You could re-write that as follows, if that helps
update t
set a = (select distinct a from t2
where t.b = t2.b)
where exists ( select 1 from t2
where t.b = t2.b)
If you have an index on t2.b, the above query would have costs equivalent to a
nested-loop join. If you do not have an index on t2.b, you could be in for a
long wait.
Note that if t2 has more than one value of "a" for a given value of "b", you
will need to change your query as follows
update t
set a = (select distinct a from t2
where t.b = t2.b)
where 1 = ( select count(distinct a) from t2
where t.b = t2.b) -- does not update rows in t that have multiple
values in t2
Anybody knows how XP would handle this problem?
HTH
Rudy
Steven Wong wrote:
> We would like to enable Informix to run this type of query:
>
> update t set a = t2.a from t, t2 where t.b =t2.b>
> Accourding to the Informix Help, it says to have Dynamci Servier with AD and
> XP options allows this type of update join.
>
> Any Idea on how to turn this on?
>
> We are running
>
> Informix 7.3 TC3
> Windows NT Server 4.0 SP3
>
> Thanks for any feedback
>
> Steve