Using select idrecord from defects where defectnum=3200
I got 3231 as idrecord. Then runing a query
select * from custmval where iddefrec=3231, allreturns instantly.
But If I put them together in either one of ways below, the query hangs, which I take it as extremely slow. Anyone has any idea why and how to solve this issue? Thanks.
1)select d.summary, d.idrecord from
(select defects.summary, defects.idrecord
from defects
where defects.defectnum=3200) d, custmval
where custmval.iddefrec=d.idrecord
2)select defects.summary, defects.idrecord
from defects ,custmval
where defects.defectnum=3200 and custmval.iddefrec=defects.idrecord
I got 3231 as idrecord. Then runing a query
select * from custmval where iddefrec=3231, allreturns instantly.
But If I put them together in either one of ways below, the query hangs, which I take it as extremely slow. Anyone has any idea why and how to solve this issue? Thanks.
1)select d.summary, d.idrecord from
(select defects.summary, defects.idrecord
from defects
where defects.defectnum=3200) d, custmval
where custmval.iddefrec=d.idrecord
2)select defects.summary, defects.idrecord
from defects ,custmval
where defects.defectnum=3200 and custmval.iddefrec=defects.idrecord