Subject | Re: [firebird-support] Re: update from select |
---|---|
Author | Ann W. Harrison |
Post date | 2007-08-20T14:48:28Z |
Milan Babuskov wrote:
field1 = (select fileld2 from table2 where...),
field2 = (select field3 from table2 where...),
...
where table1...
actually measured the performance? 100% of the pages
involved will be in cache, so it's not nearly as slow
as something like this:
update table1 set
field1 = (select fileld2 from table2 where...),
field2 = (select field3 from table3 where...),
field3 = (select field3 from table4 where...),
...
where table1...
Regards,
Ann
>update table1 set
> You could do what sasha wrote,
field1 = (select fileld2 from table2 where...),
field2 = (select field3 from table2 where...),
...
where table1...
> although it is not very good performance-wise.I agree that it's ugly to read and write, but have you
actually measured the performance? 100% of the pages
involved will be in cache, so it's not nearly as slow
as something like this:
update table1 set
field1 = (select fileld2 from table2 where...),
field2 = (select field3 from table3 where...),
field3 = (select field3 from table4 where...),
...
where table1...
Regards,
Ann