سؤال

I've got a scenario where I have a database with one table that gets tons of inserts, and it's vital that the performance is excellent for those inserts.

I also have a lot of reports, some of which hit that table.

Thus, I want to create a reporting database, which can lag the primary database a little, that I can use for running queries, so the reports don't impact the performance of the primary table.

Sheer size is also a concern - I want to keep all the history for the reports, but the transaction table only needs the last day or two, tops.

I was considering log shipping - it'll let me easily replicate all the tables in the system, so I can keep things in sync easily - but I want to be able to delete the "extra" records from the primary table to ensure it stays snappy, yet leave them in the reporting database.

Is there any way to configure log shipping for a specific table to not ship delete requests? If not, anyone have a nice suggestion for this (other than "write a script that runs every day")?

هل كانت مفيدة؟

المحلول

Nope. Log shipping is designing to replicate the entire database. There's no way to use log shipping to keep the entire history of your table while deleting it out - you're going to have to write something custom.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top