Re: optimizer choosing the wrong index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Below <machtin(dot)below(at)googlemail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: optimizer choosing the wrong index
Date: 2010-07-08 14:11:30
Message-ID: 24252.1278598290@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martin Below <machtin(dot)below(at)googlemail(dot)com> writes:
> test=# select count(*) total, count(distinct client_id) ids,
> count(distinct expires_on) dates from ps;
> total | ids | dates
> --------+--------+--------
> 213645 | 123366 | 213549

That says the expires_on column is practically unique, which makes me
think the planner is indeed making the right choice.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Neyman 2010-07-08 15:00:01 Re: Problems with Vista and Windows 7
Previous Message Martin Below 2010-07-08 12:12:51 Re: optimizer choosing the wrong index