开发者

SQL server database design question

开发者 https://www.devze.com 2023-01-07 13:56 出处:网络
I have a Users table and a Totals table which has an integer field for the total number of users. I thought about writing a console app that counts the Users table and then updates the 开发者_如何学CT

I have a Users table and a Totals table which has an integer field for the total number of users. I thought about writing a console app that counts the Users table and then updates the 开发者_如何学CTotals table. And then make a Task scheduler events that executes this app every 10 minutes. Is there a more elegant way to do this?


Make the Totals table a view, so it doesn't need to be updated at all?

or ...

Update the Totals table with ON INSERT triggers on the Users table?

0

精彩评论

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