Subject | Re: how do i speed this up |
---|---|
Author | martinknappe |
Post date | 2006-10-11T07:35:24Z |
> I think maybe:This doesnt really make sense. I am making sure that the id really
>
> > select first 1 id from dicentries where (asterm = :currentasterm
> > and id >= :currentid) order by id ascending into :idout;
>
> If none found, idout will be null
exists with
select min(asterm) from dicentries where (asterm = :priorasterm
and id >= :currentid) or (asterm > :priorasterm) into :currentasterm;
BEFORE selecting it with
select first 1 id from dicentries where (asterm = :currentasterm
and id >= :currentid) order by id ascending into :idout;