Queryability of change events

  • I have the following problem:

    I deal with a growing population of records (currently at around half million).  Each record has a life span of about 1 year.  Within their life span, certain attributes will change randomly (I only need to retain the last change of the day), and I want to capture all change history.  There are two naive ways of doing it:

    1. Take a snapshot of the data and archive them in a table with a date.

    2. Create an audit table that is populated by triggers of changes and contains only the changed attributes.

    The first one provides an easy means to query the change history, but apparently is the least efficient; the size of the data will soon explode.  The second only grows the data sparsely but adds complexity to queries.

    There must be a smarter way!  Please help!

  • I'd go with the auditing part. Good indexing should be this work pretty well.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply