From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SQL Technique Question |
Date: | 2006-06-15 22:19:40 |
Message-ID: | 20060615221940.38142.qmail@web33315.mail.mud.yahoo.com |
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.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2006-06-15 22:34:11 | Re: SQL Technique Question |
Previous Message | operationsengineer1 | 2006-06-15 22:15:53 | Re: SQL Technique Question |