Re: WG: Re: Re: select ... where <column>='' does a seqscan [auf Viren geprueft]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Silvio Matthes <silvio(dot)matthes(at)xcom(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: WG: Re: Re: select ... where <column>='' does a seqscan [auf Viren geprueft]
Date: 2004-08-24 16:55:53
Message-ID: 5083.1093366553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Silvio Matthes <silvio(dot)matthes(at)xcom(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Amiel 2004-08-24 17:08:03 Re: pg_stat_activity versus ps
Previous Message Tom Lane 2004-08-24 16:52:56 Re: select ... where <column>='' does a seqscan [auf Viren