monica1
13th May 2005, 11:51
I have a report that print transactions of a partner between the transaction date. I write this select:


select tfgld106.*, tfgld100
from tfgld106, tfgld100
where tfgld106._index3 = {:leac}
and tfgld100._index1 = {tfgld106.year, tfgld106.obat}
and tfgld100.tedt inrange :date.f and :date.t
and tfgld106.bpid inrange :bpid.f and :bpid.t
selectdo
rprt_send()
endselect


In tfgld106 table we have a million of records in each company, the time to access to this table is horrible.
There is any way to improve the time of access, something like create an index of something similiar but that don't dessapear when I finish the session?

Thank you in advance,

richard
13th May 2005, 14:18
Hello,

We had a problem with 2 indexes in the select (tdsls045 / tdsls041).
With detailed where (tfgld100.xxxx = tfgld106.xxxx and ...), the time was better.

Regards

kathuria
18th May 2005, 12:44
Hi ,

Please try with this

select tfgld106.*
from tfgld106
where tfgld106._index3 = {:leac}
and tfgld106.bpid inrange :bpid.f and :bpid.t
selectdo
select tfgld100
from tfgld100
where tfgld100._index1 = {tfgld106.year, tfgld106.obat}
and tfgld100.tedt inrange :date.f and date.t
selectdo
rprt_send()
endselect
endselect


sanjay