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

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

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: select ... where <column>='' does a seqscan [auf Viren
Date: 2004-08-24 16:52:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Silvio Matthes <silvio(dot)matthes(at)xcom(dot)de> writes:
> But in my opinion with the multicolumn index in mind the server should do 
> a index scan, because there are only 7 rows with param_name='KUNDEN_NR' 
> and param_value=''?!?

We do not have any cross-column statistics at the moment, so the planner
is unable to recognize the potential win here.  Note the poor estimate
of the number of matching rows in your EXPLAIN result.

I think though that it might help to put param_name first in the
multicolumn index.

			regards, tom lane

In response to


pgsql-general by date

Next:From: Tom LaneDate: 2004-08-24 16:55:53
Subject: Re: WG: Re: Re: select ... where <column>='' does a seqscan [auf Viren geprueft]
Previous:From: Tom LaneDate: 2004-08-24 16:43:44
Subject: Re: pg_stat_activity versus ps

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