仅仅凭你介绍的情况,很难回答你的计算是否可以在5,6个小时内完成.
从优化上考虑,
第一个table相对static,大量的inserting,updating集中在第二个table,第三个table is for one-time daily calculation. 可以考虑
(1)在第二个table加上presummarization column to hold the $amount the specifc ID spent on each stock ID to decrease the level of calculation.
(2)I don't know what kind of index you created for the third table. before the calculation, drop the index and recreate it/them after calculating.
(3) which RAID did you configure for tempdb ?RAID 5, RAID 1 or RAID 0+1? RAID 1 is the best of them.
从优化上考虑,
第一个table相对static,大量的inserting,updating集中在第二个table,第三个table is for one-time daily calculation. 可以考虑
(1)在第二个table加上presummarization column to hold the $amount the specifc ID spent on each stock ID to decrease the level of calculation.
(2)I don't know what kind of index you created for the third table. before the calculation, drop the index and recreate it/them after calculating.
(3) which RAID did you configure for tempdb ?RAID 5, RAID 1 or RAID 0+1? RAID 1 is the best of them.