Re: SQL Technique Question

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL Technique Question
Date: 2006-06-15 21:03:22
Message-ID: 20060615210322.GA22035@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jun 15, 2006 at 01:59:22PM -0700, operationsengineer1(at)yahoo(dot)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(at)crankycanuck(dot)ca
Unfortunately reformatting the Internet is a little more painful
than reformatting your hard drive when it gets out of whack.
--Scott Morris

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2006-06-15 21:21:46 Re: SQL Technique Question
Previous Message operationsengineer1 2006-06-15 20:59:22 SQL Technique Question