Subject 2 strange situations
Author Carlos H. Cantu
Hi everybody !

I'm converting a big BDE app to IBO and so I'm using Tdataset derived
comps.

I have 2 strange behaviors here :

1) with the following SQL (see end of the message) I'm getting very bug
delays when I scroll throught the dataset (next method). After the delay I
can scroll fast for 3 or 4 records and so there is another delay. Using the
monitor I saw that IBO is opening and closing cursors propably for
retrieving data BUT, why is it taking so long ? (the total numbers of
records returned from the dataset is 135)

2) When I create the form (and so Open the datasets), the process is taking
almost 6 seconds. I supose that if I use SchemaCache IBO should not
retrieve the datasets info since they are already in the cache files, right
? Well, if I set SchemaCache ON I'm getting the same 6 seconds (?!?!).
Am I missing something ?

THE SQL :

select e.cod_usu,
e.cod_matbibl,
e.empr_dtEmpr,
e.empr_dtprevdev,
e.empr_dtefetdev,
e.empr_indimp,
e.empr_obs,
e.num_ex,
rh.cod_usu as rh_cod_usu,
rh.rh_nome,
rh.rh_arealot,
rh.rh_email,
rh.rh_cargo,
rh.vincemp_id,
i.cod_usu as inst_cod_usu,
i.inst_sigla,
i.inst_nome,
i.inst_endereco,
i.inst_telefone,
a.cod_matbibl as acervo_cod_matbibl,
a.ace_titord,
a.ace_autoria,
a.ace_titulo,
a.ace_classificacao,
a.ace_cutter,
a.ace_paginas,
a.tipomat_id,
p.cod_matbibl as period_cod_matbibl,
p.per_titord,
p.per_titulo,
p.per_classificacao,
p.per_obs,
ex.ace_registro,
ex.per_volume,
ex.per_fasc,
ex.per_mespub,
ex.per_anopub
, e.ID_EMPR
from emprestimo e
left outer join acervo a on e.cod_matbibl = a.cod_matbibl
left outer join periodic p on e.cod_matbibl = p.cod_matbibl
left outer join rh on e.cod_usu = rh.cod_usu
left outer join instit i on e.cod_usu = i.cod_usu
left outer join exemplar ex on (e.cod_matbibl = ex.cod_matbibl) and (e.num_ex = ex.num_ex)
order by id_empr


[]s

Carlos
WarmBoot Informatica - http://www.warmboot.com.br
Interbase-BR - http://www.interbase-br.com