大家帮忙看下,下面的sql。大概更新15W左右数据,现在需要5分钟,怎么才能提高一下速度。ORACLE多表关联更新,还能怎么写???
update tb_rpt_jxc m
   set (endnum, endjprice, endnetjprice, endprice, endcost, endnetcost, endtotal) = (select sum(c.count),
                                                                                            b.jprice,
                                                                                            b.netjprice,
                                                                                            a.price,
                                                                                            sum(c.cost),
                                                                                            sum(c.netcost),
                                                                                            sum(c.price *
                                                                                                c.count)
                                                                                       from tb_goods            a,
                                                                                            tb_goodsorg         b,
                                                                                            tb_goodsstockdetail c
                                                                                      where a.plucode =
                                                                                            b.plucode
                                                                                        and a.plucode =
                                                                                            c.plucode
                                                                                        and a.plucode =
                                                                                            m.plucode
                                                                                      group by b.jprice,
                                                                                               b.netjprice,
                                                                                               a.price)
 where accdate = to_date('2012-07-25','yyyy-mm-dd') ;