Subject Re: Speedup delete-statement
Author swestner
Hello Alexandre,

the SQL is written by us and not generated by BOLD. It only works on
a BOLD-DB.
The problems the last week with BOLD-performance you may referenced
and which come from me could all be resolved by correcting some
indexes in the firebird-DB.

For example my post from 3rd August:
SELECT IwadisObje_1.BOLD_ID, IwadisObje_1.BOLD_TYPE
FROM IwadisObject IwadisObje_1 JOIN Word Word_1 ON
(IwadisObje_1.BOLD_ID = Word_1.indexedObject)
WHERE (Word_1.data LIKE 'SCHAAF%')

Firebird uses always the index on word.indexedobject instead the
index on word.data.
If the index on indexedobject is dropped then firebird uses the index
on data and the whole query runs in seconds.

We are very satisfied with BOLD which allows us to model in UML,
adress the objectspace with OCL, caches data which is fetched from
DB, do the model-evolution for us and some features more.

Stefan

--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@...> wrote:
>
> swestner wrote:
> > Hello,
> >
> > does anybody know if there is an alternative to the following
select:
> >
> > delete from businessclassesroot where bold_id in
> > (select bold_id from iwadisobject_lrutimeslot where objects not in
> > (select bold_id from iwadisobject))
> >
> > It runs about an hour on a DB which have 30.000.000 entries in
> > businessclassesroot and iwadisobject.
> >
> > The actual plan is:
> >
> > PLAN (IWADISOBJECT NATURAL)
> > PLAN (IWADISOBJECT_LRUTIMESLOT INDEX
(IX_IWADISOBJECT_LRUTIMESL09I))
> > PLAN (BUSINESSCLASSESROOT NATURAL)
> >
> > There are indexes on ale columns which are used in the SQL.
> >
> > Thanks
> >
> > Stefan
> >
>
> Hans had already answered your question...
>
> I am posting just as a comment.
>
> From the last week I saw some complaints about BOLD generated SQL.
>
> It gives me a really bad impression about that framework.
>
> Thanks I did my own O-R mapper a few years ago, and that I could
change
> it as I wish to handle such cases.
>
> It's a pity that such product has no provision to let the developer
> customize the used SQL.
>
> see you !
>
>
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>