Re: Problem with inherited tables vs query planning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Golombek" <daveg(at)blackducksoftware(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with inherited tables vs query planning
Date: 2007-05-18 02:49:17
Message-ID: 17674.1179456557@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Dave Golombek" <daveg(at)blackducksoftware(dot)com> writes:
> Is there a way I can reformulate the query to help the planner use the
> indices?

Use 8.2. Also put an index on the base table, not only the children ---
the forced seqscan on the base weighs down the cost estimate for the
plan you would like to have. (With sufficiently large child tables,
that might not matter, but it sure does for this toy example.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2007-05-18 03:47:26 Postgres / Jaro Winkler fuzzy string matching
Previous Message Dave Golombek 2007-05-18 01:42:04 Problem with inherited tables vs query planning