mihaela
20th February 2004, 12:44
Hello.
select tditc545.*
from tditc545, tiitm001
where tditc545._index1 inrange {:first.day} and {:last.day}
and tiitm001._compnr = tditc545.ncmp
and tiitm001._index1 = {tditc545.item}
and tiitm001._index8 inrange {:citg.f} and {:citg.t}
selectdo
rprt_send()
endselect
The problem is execution time. The table tditc545 has 80000 rows on one company and 700 on the second and tiitm001 has 40000 on the first and 2000 on the second. If I run the select only on the first company (without the tiitm001._compnr clause), I get a response in 10 seconds. If I run it like it is described above, it runs for 15 minuntes and I cannot understand why.
The table tditc545 has a field called ncmp (company number) and there are items present only on one company and not on the other...
Please help me...
Thank you,
Mihaela.
select tditc545.*
from tditc545, tiitm001
where tditc545._index1 inrange {:first.day} and {:last.day}
and tiitm001._compnr = tditc545.ncmp
and tiitm001._index1 = {tditc545.item}
and tiitm001._index8 inrange {:citg.f} and {:citg.t}
selectdo
rprt_send()
endselect
The problem is execution time. The table tditc545 has 80000 rows on one company and 700 on the second and tiitm001 has 40000 on the first and 2000 on the second. If I run the select only on the first company (without the tiitm001._compnr clause), I get a response in 10 seconds. If I run it like it is described above, it runs for 15 minuntes and I cannot understand why.
The table tditc545 has a field called ncmp (company number) and there are items present only on one company and not on the other...
Please help me...
Thank you,
Mihaela.