2008/12/8 Grzegorz Jaśkiewicz <[EMAIL PROTECTED]> > try rewriting it to something like: > > update users set price = p.price from prices p where p.type = > 'normal_price' and p.currency = users.currency;
also avoid "fake" updates: update users set price = p.price from prices p where p.type = 'normal_price' and p.currency = users.currency and users.price is distinct from p.price; If price change is a frequent operation, rethink the design - maybe you could keep a pointer to "pricing group" instead of keeping separate price for every user. -- Filip Rembiałkowski