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

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 (view raw or flat)
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

pgsql-general by date

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

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