Re: MACADDR types NULL value (undocumented?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mayers, Philip J" <p(dot)mayers(at)ic(dot)ac(dot)uk>
Cc: "'Michael Fork'" <mfork(at)toledolink(dot)com>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: MACADDR types NULL value (undocumented?)
Date: 2001-03-26 14:45:27
Message-ID: 28335.985617927@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Mayers, Philip J" <p(dot)mayers(at)ic(dot)ac(dot)uk> writes:
> Oops, yes, you're quite correct: There are some 17700 entries in the table,
> with 1793 being 00:00:00:00:00:00 - and that warrants a sequential scan,
> you're correct. Damn :o)

If these all-zero entries (a) are really dummy values ("don't know" or
"not applicable"), and (b) outnumber any specific real entry, then it
would be worth your while to replace them with NULLs. The statistics
stuff accounts for NULLs separately from not-nulls, so after a vacuum
analyze you'd find the planner more able to make an intelligent choice
about seq vs index scan on this table.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mayers, Philip J 2001-03-26 14:56:05 RE: MACADDR types NULL value (undocumented?)
Previous Message Mitch Vincent 2001-03-26 14:38:46 Re: Free Text Search