Re: optimizer tuning/forcing correct index use

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kelly Burkhart <kelly(at)tradebotsystems(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: optimizer tuning/forcing correct index use
Date: 2002-03-19 15:28:42
Message-ID: 29145.1016551722@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kelly Burkhart <kelly(at)tradebotsystems(dot)com> writes:
> The critical part is driving the fill table query from a sequential scan
> rather than a scan of fill_ak2.

Have you done an ANALYZE or VACUUM ANALYZE lately? If so, what do you
get from

select * from pg_stats where tablename = 'fill';
select * from pg_class where relname = 'fill';

Offhand I am guessing that the table is fairly well ordered by fill_ts
and the planner is underestimating the effects of this. There is a
provision in there to try to account for data ordering, but it's new
code in 7.2 and doubtless still needs refinement.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kelly Burkhart 2002-03-19 17:12:10 Re: optimizer tuning/forcing correct index use
Previous Message Jan Wieck 2002-03-19 14:25:37 Re: create function problem