Database Reference
In-Depth Information
Part 3 : This uses the information of Part 1 and Part 2, and recalculates
and sets the price at every intermediate level that it passes. At the top of
the tree ( n1 ), it will return the new price of the product.
Running this query on the dataset runs the following result:
Recalculating the price with one change in the hierarchy
This is really good; recalculating the price over a hierarchy of 2.1 million things all
of a sudden only takes 117 milliseconds. Not too bad. Let's see if that also works if
we change the price of more than one cost component. If we use the preceding query
but change limit 1 to limit 100 and run this query, we get the following result:
Recalculating the price based on 100 changes in the hierarchy
The effect of recalculating the price of the product based on a hundred changes in
the hierarchy is done in 314 milliseconds—a truly great result. This sets us up for
a fantastic way of simulating these impacts over our dataset.
This concludes our discussion of the impact simulation and allows us to start
wrapping up this chapter.
 
Search WWH ::




Custom Search