Subject | Re: [ib-support] how to perform update with aggregate subselect ? |
---|---|
Author | Martijn Tonies |
Post date | 2002-06-19T12:40:34Z |
Hi,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> Help me please with this:What is the query plan?
>
> update table1
> set total = (select sum(Quantity) from table2 where table2.CustomerID
> = table1.CustomerID)
>
> CustomerID is a foreign key for both tables, references to the same
> table "Customers".
> That operator hangs because table2 is large and engine uses natural
> joins. How to work arround the problem?
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."