Re: Planner matching constants across tables in a

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Planner matching constants across tables in a
Date: 2003-03-05 19:00:23
Message-ID: web-2881474@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Richard,

> A domain defined as varchar() actually - which is why it's not using
> an index,
> but that's neither here nor there regarding the constant issue.

You might improve your performance overall if you cast the constant to
tel_num before doing the comparison in the query. Right now, the
parser is casting the whole column to text instead, because it can't
tell that the constant you supply is a valid tel_num.

-Josh

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2003-03-05 19:25:43 Re: Planner matching constants across tables in a
Previous Message Richard Huxton 2003-03-05 16:12:09 Re: Planner matching constants across tables in a join