Subject Re: [firebird-support] 20 minute query in v 2.0 and 2.1
Author Arno Brinkman

> We have a query that is fast in the FB 2.0 RC version, but in 2.0 and
> 2.1 takes 20 minutes. Essentially it deletes all records from a table
> in a master detail relationship.
> something like delete from detailTable where not exists (select distict
> masterTable.ID from masterTable where mastertableID = detailTable.FK)

The DISTINCT will cause that the sub-select is first executed fully and sorted afterwards and that
for every record in detailTable. I don't see the use of the DISTINCT function in a EXISTS predicate
thus i would remove that one and see what speed is then.

Arno Brinkman

General database development support:

Firebird open source database (based on IB-OE) with many SQL-99 features :

Support list for Firebird and Interbase users :

Nederlandse firebird nieuwsgroep :