[Leaplist] coding - rdbms, revisions, and fks
Phil Barnett
philb at philb.us
Fri Dec 4 21:04:58 EST 2009
On Fri, Dec 4, 2009 at 1:52 AM, John Simpson <jms1 at jms1.net> wrote:
> On 2009-12-03, at 2241, Phil Barnett wrote:
> >
> > You can certainly do this, but it's wasteful.
> >
> > All you really need in the history is:
> >
> > 1. Original records that generated the mailing that don't change. If you
> > need to edit them, save a new different copy with a new differnent id.
> Link
> > the two records together so you know they are cousins.
> >
> > 2. History tables with dates and pointers to the original records.
> >
> > This consumes less space.
> >
> > Duplicating data that is already in the system is wasteful if you can
> refer
> > to an original copy of it.
>
>
> one, disk space is cheap these days.
>
Bah, Bad thinking. This is where things go wrong all the time where I work.
Wasting 40% space is obviously no big deal on a 200M table. Then you get
into a place like Disney and you wasted 40% of 1T. And then you have to
rethink and redesign something that could easily have been right from the
beginning.
Bad thinking. Efficiency doesn't come from throwing more hardware at a
problem, efficiency comes from the mind.
>
> in the code which actually does a mailing... i'm sure your existing SELECT
> query to get the address data for doing a mailing is complex enough as it
> is, so here's a way which is easier to implement and will probably run
> faster than trying to force the SQL server to only return those records
> which have the highest rev for that aid value...
>
> Yeah, like marking the old records inactive when they get cloned forward.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.leap-cf.org/pipermail/leaplist/attachments/20091204/46edbf62/attachment.html
More information about the Leaplist
mailing list