What is the best way to refresh a rollup table under load?

前端 未结 4 2130
无人共我
无人共我 2020-12-20 04:14

I created a table in my SQL Server 2005 database and populated it with summary and calculated values. The purpose is to avoid extensive joins and groupings on every call to

4条回答
  •  萌比男神i
    2020-12-20 05:10

    It depends on the relationships in your database and the queries you run against it.

    If it's a summary table that can tolerate stale data, you could populate it using queries that perform their SELECTs without locks using the NOLOCK join hint. NOTE: use of the NOLOCK hint should only be done when you are sure of the consequences.

    There is often scope for re-tuning indexes, to reduce loading.

提交回复
热议问题