From: Josh Berkus <josh@agliodbs.com>
To: Richard Huxton <dev@archonet.com>
To: Greg Stark <gsstark@mit.edu>
Cc: Greg Stark <gsstark@mit.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Planner matching constants across tables in a
Date: Wed, 05 Mar 2003 11:00:23 -0800
Message-ID: <web-2881474@davinci.ethosmedia.com> (raw)
In-Reply-To: <200303051612.09558.dev@archonet.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, dev@archonet.com, gsstark@mit.edu
Subject: Re: Planner matching constants across tables in a
In-Reply-To: <web-2881474@davinci.ethosmedia.com>
References: <200303051612.09558.dev@archonet.com> <web-2881474@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox