On Fri, Aug 06, 2004 at 10:27:17AM -0700, Josh Berkus wrote:
> > Approximately 14 billion. Ok, I'm kidding, but can anyone answer
> > my question? Although this might be micro-optimization, does it
> > hurt to know more about date performance?
> No, there's nothing wrong with knowing. What David and I are
> asserting is that your decision should be determined by having a
> correct data model, and not by counting bits, unless you're in a
> really extreme situation where you have already tested and know you
> have a problem.
> Josh's Database Rules #3: the performance loss for slow queries is
> generally exceeded by the downtime caused by a bad data model by a
> factor of 100 or more.
A corollary, Dave's Database Rule #187, is that Josh's Database Rule
#3 wildly underestimates this factor.
> > There are two parts to my question; one, which is faster, and two,
> > does anyone have any advice about using either a single boolean
> > flag or using a 1-n type date?
> Which is faster depends on your query structure and the distribution
> of your data; that's the other reason not to make decisions on this
> basis now. If you want a serious answer on this, please post your
> current table structure and an explanation of what kind of data is
> kept in the various fields and how you query it.
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778
Remember to vote!
In response to
sfpug by date
|Next:||From: elein||Date: 2004-08-07 18:37:04|
|Subject: Linux World experiences|
|Previous:||From: Josh Berkus||Date: 2004-08-06 17:27:17|
|Subject: Re: Using null date fields to indicate active/expired records|