English 中文(简体)
Tips for splitting database
原标题:

I have read a couple of books on SQL Server 2005 but have not found a proper answer to what I am looking for.

The problem is like this :- I have a database that is being used by 5-20 users at a time for booking customer orders. They receive many orders in a day on phone so placement of orders and lookup of productsold orders have to be fast.

Over time many orders have been placed. There are many tables which contain this order details and there are many reports which use this data. Problem is that the reports are very slow. Indexing has helped a bit but not as much as I expected.

After reading around a bit I want to try dividing the database into two - one for online transactions and one for reporting only.

I would be very thankful to you if you help me by suggesting a book or site that will teach me how to design the database for quick reporting and how to separate out the two databases - one for online transactions and other for quick reporting (Will this be a datawarehouse design for quick reporting? )

My main goal is to make very fast reports ( some reports now take 5 mins to run and it will get slower with more data ). Any help in pointing me in the right direction will be deeply appreciated.

问题回答

Look at Data Warehouse Toolkit from Ralph Kimball. Just a plain star-schema may be able to speed up reporting. And here is an example of how the star schema simplifies reporting.

First, definitely look at your existing design and workload.

If you can t optimize your OLTP side any further, I would totally go to a Kimball data warehouse methodology. Update your data on a regular database using SSIS or whatever and transform your data into stars. What you should find is that your reporting performance should improve drastically and not interfere with your production transactions on the OLTP/normalized side.

This can improve to the point where you can even keep the two databases in very close sync using the spare cycles which were previously beeing eaten up by reporting on a normalized database schema which is not well suited to reporting. You can use triggers or scheduled tasks to keep the warehouse up to date relatively easily with more complex options available if you scale up.

If your database is not terribly huge, this does not necessarily need to be in two databases, you could just use a different schema to keep them logically organized, and even if you split it, you can put views in your OLTP database to make them available without changing the database on your connection. The main benefits of having a separate database is to change your database-wide options, like collations or backup model (of course you can also use file groups to help with that).





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签