Re: WG: Re: Re: select ... where ='' does a seqscan [auf Viren geprueft] - Mailing list pgsql-general

From Tom Lane
Subject Re: WG: Re: Re: select ... where ='' does a seqscan [auf Viren geprueft]
Date
Msg-id 5083.1093366553@sss.pgh.pa.us
Whole thread Raw
In response to WG: Re: Re: select ... where ='' does a seqscan [auf Viren geprueft]  (Silvio Matthes <silvio.matthes@xcom.de>)
List pgsql-general
Silvio Matthes <silvio.matthes@xcom.de> writes:
> 2.) Would it be wiser to change all the empty values to some placeholder
> (e.g. 'empty')?

You're missing the point entirely.  '' is being treated specially
because the planner can see from the column statistics that it occurs a
lot.  Substituting a different value would simply move the problem over
to that value (as soon as you'd done ANALYZE, anyway).

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: select ... where ='' does a seqscan [auf Viren
Next
From: Jeff Amiel
Date:
Subject: Re: pg_stat_activity versus ps