Hi,
I have dbf file dkcz.dbf (about 8 MB) and 3 ntx files:
dkcz01.ntx [expression: rk+left(id_wej,1)+typdkcz+nrdkcz]
dkcz02.ntx [expression: rk+mc+typdkcz+id_wej+id_ob+id_kli+flgzal]
dkcz03.ntx [expr: typdkcz+id_wej+id_ob+id_kli+rk+mc]
and also dkcz.cgp.
but sql
select count(*) as c from czynsz.dkcz where rk = '2009' and mc = '07' and typdkcz = 'F' and trim(id_wej) = '91001' and trim(id_ob) = '002'"
is very slow. Execution takes about 2 sec. Is there any possible optimization?
thx in advance
|
>select count(*) as c from czynsz.dkcz where rk = '2009' and mc = '07' and typdkcz = 'F' and trim(id_wej) = '91001' and trim(id_ob) = '002'"
It will utilize index for rk=2009 condtion. You can try select count(*) as c from czynsz.dkcz where rk+mc+typdkcz = '200907F' and trim(id_wej) = '91001' and trim(id_ob) = '002'", if you can make sure rk is a column with char(4), mc is a column with char(2), and typdkcz is a column with char(1).
|
Thanks you for your response. I made some tests and I think my greatest problem is that all files are stored on maped novell disks. When I copy data from novell disk to local file system query above works quite fast. But I can make it only for tests ;/.
|
>is that all files are stored on maped novell disks.
Yeah. CUP burden, network bottleneck and IO issue can slowe speed. HXTT DBF supports also novell OS.
|