db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Bad performance with UPDATE on a nested SELECT
Date Tue, 13 Jan 2009 15:42:03 GMT
Mikkel Kamstrup Erlandsen <mke@statsbiblioteket.dk> writes:

> On Tue, 2009-01-13 at 11:59 +0100, Knut Anders Hatlen wrote:
>> UPDATE summa_records SET base='my_base' WHERE id IN
>>   (SELECT parentId FROM summa_relations --DERBY-PROPERTIES index=C
>>       WHERE childId='horizon_2332668')
>
> Hmmm... I just get:
> ERROR 42X41: In the Properties clause of a FROM list, the property
> 'index' is not valid (the property was being set to 'C').
>
> Does this require Derby trunk or something?

No, I did this with 10.4.2.0:

ij> create table summa_records (id varchar(20), base varchar(10));
0 rows inserted/updated/deleted
ij> create table summa_relations (parentId varchar(20), childId varchar(20));
0 rows inserted/updated/deleted
ij> insert into summa_records(id) values 'test1', 'test2';
2 rows inserted/updated/deleted
ij> insert into summa_relations values ('test1', 'test2');
1 row inserted/updated/deleted
ij> create index c on summa_relations(childId);
0 rows inserted/updated/deleted
ij> UPDATE summa_records SET base='my_base' WHERE id IN
>   (SELECT parentId FROM summa_relations --DERBY-PROPERTIES index=C
>     WHERE childId='test2');
1 row inserted/updated/deleted

-- 
Knut Anders

Mime
View raw message