Re: Order details table reference live data

From: Johan Sjöström <daddynahoj_at_hotmail.com>
Date: 3 Sep 2006 11:32:22 -0700
Message-ID: <1157308342.004874.41020_at_m73g2000cwd.googlegroups.com>


I don't think producing reports would be tricky if the correct data had been copied instead. That way, most data JOINs etc would have been made at the moment of the order, so getting report data would basically be fetching a few rows. Today, an order report query can include 8 to 10 INNER JOINs and 3 to 5 OUTER JOINs altogether.

A timestamp for the entities' rows seems interesting.. but since many entities change a lot over time, every save operation would create new rows and SELECT query durations would probably increase a lot. (Although, a clustered index on this timestamp would probably be very beneficial. I might just look into it! I guess one could script a delete of old versions that aren't referenced by orders also.

Thanks!

Johan Sjöström
MSc, MCAD

Alexandr Savinov skrev:
> The simplest (and the worst) form would be to copy the current state of the
> data in a separate location. For example, to store somewhere the current
> product price and the current customer address. Yet, it is rather bad
> solution because this state is not easily available for other elements
> of the model. Say, it is difficult to produce historic reports.
Received on Sun Sep 03 2006 - 20:32:22 CEST

Original text of this message