Re: SQL Technique Question - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: SQL Technique Question
Date
Msg-id 20060615210322.GA22035@phlogiston.dyndns.org
Whole thread Raw
In response to SQL Technique Question  (<operationsengineer1@yahoo.com>)
Responses Re: SQL Technique Question
List pgsql-sql
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


pgsql-sql by date:

Previous
From:
Date:
Subject: SQL Technique Question
Next
From: Rod Taylor
Date:
Subject: Re: SQL Technique Question