From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: SQL Technique Question
Date: Thu, 15 Jun 2006 17:03:22 -0400
Message-ID: <20060615210322.GA22035@phlogiston.dyndns.org> (raw)
In-Reply-To: <20060615205922.4834.qmail@web33301.mail.mud.yahoo.com>
References: <20060615205922.4834.qmail@web33301.mail.mud.yahoo.com>
On Thu, Jun 15, 2006 at 01:59:22PM -0700, operationsengineer1@yahoo.com wrote:
>
> is it a good practice to leave this included in the
> queries, as is, or should i factor it out somehow? if
> i should factor it, how do i do so?
If what you're saying is that these additional criteria are
redundant, then it's up to you: what do you want to optimise for? If
you're protecting against future errors, then the additional
criteria might help. If you're protecting against having to write
your code to produce a more efficient query, you should weigh the
cost and benefit (which benefit includes "easier to debug queries").
There is a probably non-zero cost to the extra joins.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
Unfortunately reformatting the Internet is a little more painful
than reformatting your hard drive when it gets out of whack.
--Scott Morris
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ajs@crankycanuck.ca
Subject: Re: SQL Technique Question
In-Reply-To: <20060615210322.GA22035@phlogiston.dyndns.org>
* 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