开发者

Too many database updates problem

I got a problem with too many updates in a php script. The queries are simple but they're about 300 to 400 at once. I send all the data by ajax and then in php I run a loop to execute the queries. They're like this one:

UPDATE APPS.DIB_CUS_FUNDIDOS SET
    R$KG_SINSP_CICMS = 3.85

WHERE
    ID_PRODUTO = 313;

So when I run it's never return a 开发者_如何转开发answer, never ends and my IE breaks up and I have to close and open again. The queries aren't executed at all.

What I'm looking for is an performance solution. Any ideas ?


300 updates like you made an example should be executed in less than second.

I guess you are missing an index on ID_PRODUTO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜