Re: RE: Can't get Postgres to use indices

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Othman Laraki" <othman(at)epitrope(dot)com>
Cc: "Mitch Vincent" <mitch(at)venux(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: RE: Can't get Postgres to use indices
Date: 2001-05-04 04:47:52
Message-ID: 23289.988951672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Othman Laraki" <othman(at)epitrope(dot)com> writes:
> THE QUERY
> =========

> SELECT a1.tid, x2 FROM ep_tbl_cache, ep_tbl_page_topic_map as a1 WHERE
> x1=a1.pid AND x1 is not null and x1 <> '' and x1 <> '-' AND
> ep_tbl_cache.identifier = 'bg2hyr0p51_cached_Thu May 03 13:43:07 PDT 2001';

The only available join clause here is x1=a1.pid. Unfortunately,
x1 is VARCHAR(100) and a1.pid is INT8. To get a more reasonable
join plan, try fixing your table declarations so that the join
clause doesn't involve a forced type conversion.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Miles 2001-05-04 04:52:39 weird table doubling -- how to fix?
Previous Message will trillich 2001-05-04 04:40:14 Re: a primer on trigger?