Skip site navigation (1) Skip section navigation (2)

Re: Using null date fields to indicate active/expired records

From: David Fetter <david(at)fetter(dot)org>
To: Brian Ghidinelli <brian(at)pukkasoft(dot)com>
Cc: sfpug(at)postgresql(dot)org
Subject: Re: Using null date fields to indicate active/expired records
Date: 2004-08-06 15:34:01
Message-ID: 20040806153401.GF27306@fetter.org (view raw or flat)
Thread:
Lists: sfpug
On Fri, Aug 06, 2004 at 01:31:12PM +0200, Brian Ghidinelli wrote:

> Does anyone have any experience using a start/end date pair to
> indicate active/expired records where a NULL end date indicates an
> active record?

NULL end date really means "end date is unknown."   An expired record
would be one with an end date in the past.

> I'm looking for performance comparisons to using a simple boolean
> field to indicate the same.

Premature optimization is a Bad Thing(TM).  Don't do it!
Micro-optimization on this level is just silly.

Cheers,
D
-- 
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

Responses

sfpug by date

Next:From: Josh BerkusDate: 2004-08-06 16:15:47
Subject: Re: Using null date fields to indicate active/expired records
Previous:From: Brian GhidinelliDate: 2004-08-06 11:31:12
Subject: Using null date fields to indicate active/expired records

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group