>Hello,
>
> thanks Set, makes my test unnecessary!
>
> But I'm thinking a little bit about my original problem.
>
> Would it make sense to add a tracker entry for optimization of
> subselects without reference to outer query?
>
> I think that they should get evaluated and transformed to someth
Hello,
thanks Set, makes my test unnecessary!
But I'm thinking a little bit about my original problem.
Would it make sense to add a tracker entry for optimization of
subselects without reference to outer query?
I think that they should get evaluated and transformed to something
lik
Well done Set
Greetings.
Walter.
On Tue, Dec 16, 2014 at 4:30 PM, Svein Erling Tysvær
svein.erling.tysv...@kreftregisteret.no [firebird-support] <
firebird-support@yahoogroups.com> wrote:
>
>
>
> >> I don't think there is any simple way to make a delete with a
> >> subselect as the only part of
>> I don't think there is any simple way to make a delete with a
>> subselect as the only part of a where clause perform great on
>> largish tables. That is, using EXECUTE BLOCK (which doesn't exist on
>> older Firebird versions) should perform OK:
>>
>> execute block as
>>declare variable id
Hello,
well, that's not the answer I wanted to get, but I've to deal with
that fact.
I've to check wether EXECUTE STATEMENT can execute EXECUTE
BLOCKs, as the DELETE Statement is build dynamically in a proc.
>
> Hi Björn!
>
> I don't think there is any simple way to make a dele
>Hello,
>
> Thanks for the answer.
> How can I optimize if I want to use a DML command in conjunction
> with a subselect, e.g.
>
> delete from test where Id in (
> select min(t.Id) FROM test t
> group by t.reference, t.key
> having count(*) > 1
> )
>
Hi Björn!
I don't think there is any simpl
Hello,
Thanks for the answer.
How can I optimize if I want to use a DML command in conjunction
with a subselect, e.g.
delete from test where Id in (
select min(t.Id) FROM test t
group by t.reference, t.key
having count(*) > 1
)
am Dienstag, 16. Dezember 2014 um 08:27 schrieben Sie:
15.12.2014 23:27, bjoern.rei...@fau.de wrote:
>
> select min(t.Id) FROM test t
> group by t.reference, t.key
> having count(*) > 1
>
> costs 1000 Non indexed reads
>
> select * from test where Id in (
> select min(t.Id) FROM test t
> group by t.reference, t.key
> having count(*) > 1
> )
>
> costs 1