Re: RE: Can't get Postgres to use indices - Mailing list pgsql-general

From Tom Lane
Subject Re: RE: Can't get Postgres to use indices
Date
Msg-id 23289.988951672@sss.pgh.pa.us
Whole thread Raw
In response to RE: Can't get Postgres to use indices  ("Othman Laraki" <othman@epitrope.com>)
Responses RE: RE: Can't get Postgres to use indices  ("Othman Laraki" <othman@epitrope.com>)
List pgsql-general
"Othman Laraki" <othman@epitrope.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

pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: a primer on trigger?
Next
From: Frank Miles
Date:
Subject: weird table doubling -- how to fix?