Application (OLTP) and reporting (DW) loads can be and usually are very different on applications of scale. OLTP transactions deal with a small amount of records at a time, happen often and could be a select, insert or update. DW queries tend to process a larger number of record, happen less often and should be read only.
On smaller applications or a young application that does not have a history of data yet, performance will not be a problem. But as your application grows and gains popularity a separate database and eventually a separate server will be required to meet both the business needs of application performance and analytic reporting.
Here is an overview of the two types of workload.
OLTP queries are usually written by developers who have a vested interest in application performance and know exactly what type of business function they are trying to meet. The same query is performed many times a day and problems are tuned out. Here are some examples of the type of work load.
- record a sale.
- verify password.
- retrieve product detail.
- update user profile.
DW queries may be auto generated by query tools for adhoc reporting or may be written directly by an analyst or business user with little technical experience. Some may prefer to do a select * into their tool of choice like SAS or Mathematica. These types of queries if not done with dirty reads can wreak havoc on the performance of the OLTP application. Even a well written query to do a trended analyses or to group a large number of customers into percentiles could require a full table scan by virtue of requiring all the data. Types of questions that may need to be answered.
- How many bicycles where sold today, this week, last month.
- What is the most popular product.
- What time of day do product with high margin sell.
- Give me a trended graph of pageviews for the year.