GRANT CREATE PROCEDURE TO user ..
?? IN SHEMA_NAME ??
I dont know if that's possible...
You can perhaps grant to create in a shema and not grant to create in another...
We can do a simple test...
Just take a simple JOIN querry like this:
select table1.*
from table1, table2
where table1.id = table2.id
and table2.col3 = 'TEST';
And transform it like this:
select *
from table1
where table1.id IN
( SELECT id
FROM table2
WHERE col3 = 'TEST')...
EXISTS is faster than the "correlated-IN-sub-querry"
because EXISTS stops as soon as possible:
It don't read all the records of the subquerry
(in oposite of corralated IN, that do it...)
The problem is that the sub-querry is NON CORRALATED, and then, should be run once and not for each row...
MarcLodge,
- The interim result table contains 2 rows;
- The non-corralated sub querry is executed
for each row in the main querry! (Visual Explains helps me...)
Thanks for your help, but i can't find any solution, the problem seems to come from DB2 :-( (and i'm on V5R3)
PS: don't...
Thank you for your responses.
I agree with you, ddiamonde, the querry with EXISTS is faster...
This is the prove that DB2 is executing my "IN querry" like if it was a correlative sub-querry...
(EXISTS operator is more powerfull for correlative sub-querries)
But this is not a correlative...
Hi,
I have a problem with a simple querry:
select * from
tmissdta.prr000f
WHERE NRPOL in
(
SELECT NRPOL
from TMISSDTA.PRR130F
where nrprs = 01545454
)
I think that the sub-querry is executed for each row ... !
:-S
It take approximatively 150 secondes to be executed!
(And this is not a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.