pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: operationsengineer1@yahoo.com
To: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: SQL Technique Question
Date: Thu, 15 Jun 2006 15:19:40 -0700 (PDT)
Message-ID: <20060615221940.38142.qmail@web33315.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060615210322.GA22035@phlogiston.dyndns.org>

> 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.

Andrew and Rod,

my apologies for not being more clear in my question.

all the code is required to get from t_inspect_result
data back to t_product information.

however, many of the joins are used over and over and
over - making for a complex query to view and try and
to debug - not to mention forcing a long trail of
chasing linked data to get from t_inspect_result_id
back to the linked t_product data.

Thanks for taking the time to address the question -
and i will try and be more clear going forward.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



view thread (7+ messages)  latest in thread

Message-ID: <20060615221940.38142.qmail@web33315.mail.mud.yahoo.com>
Permalink:  ../20060615221940.38142.qmail@web33315.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060615221940.38142.qmail@web33315.mail.mud.yahoo.com

 · 

reply

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: operationsengineer1@yahoo.com, ajs@crankycanuck.ca
  Subject: Re: SQL Technique Question
  In-Reply-To: <20060615221940.38142.qmail@web33315.mail.mud.yahoo.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