Re: MACADDR types NULL value (undocumented?) - Mailing list pgsql-general

From Tom Lane
Subject Re: MACADDR types NULL value (undocumented?)
Date
Msg-id 28335.985617927@sss.pgh.pa.us
Whole thread Raw
In response to RE: MACADDR types NULL value (undocumented?)  ("Mayers, Philip J" <p.mayers@ic.ac.uk>)
List pgsql-general
"Mayers, Philip J" <p.mayers@ic.ac.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

pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: Free Text Search
Next
From: "Mayers, Philip J"
Date:
Subject: RE: MACADDR types NULL value (undocumented?)