> I disagree with the SPEED statement, and if you find it difficult
> to manage
> it's complexities then .........

Actually, I have found overall speed is not so much the issue unless there
is a non-optimized piece in the SQL-SELECT code.  In that case it seems the
speed is greater if I can isolate the non-optimized SQL-SELECT statement.
And, I am in total agreement with Kristyne re: it being easier to read/debug
SQL-SELECT when it is broken into several steps.  It is not that I can't
deal with the complexities.  It is more that years after I cut the code it
is easier for me to "get it again" if the SQL-SELECT code is broken into
logical steps - much less for someone less familiar with my code than I.

Usually once I get the results I want I am tempted to just put all the
statements into one big, honking SQL-SELECT statement and let 'er rip.  But
in almost every case I opt to leave it as is since it is working, and it
does make for easier understanding when I come back to the code many years
later.  Further, if I want to use just one piece of the code elsewhere it is
easy to isolate what I want to pull out.

There are quite a few places where I build SQL-SELECT statements on-the-fly
based on certain table and variable values.  In those cases I find it far
easier to break things into logical SQL-SELECT statement packs for debugging
purposes.  And, again, once it is working I tend to leave well enough alone.
Even if I could pick up a little speed were I to just assemble the code into
a single statement, with the cheap RAM and CPU speeds we are seeing now,
well, it is hardly worth trying to chase a nano-second here or a
micro-second there.  Of course, a lot of my SQL-SELECT processing is done on
an automated basis, and little of this really impacts my End User apps.  So
I guess the need to chase speed is still kind of situational.


Gil

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Stephen Russell
> Sent: Wednesday, April 30, 2008 8:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Simple two step query possible in one?
>
>
> On Tue, Apr 29, 2008 at 9:05 PM, MB Software Solutions General Account <
> [EMAIL PROTECTED]> wrote:
>
> > Kristyne McDaniel wrote:
> > > Mark,
> > >
> > > Two steps are often faster than one even if you can do it in a single
> > step.
> > > Is there a reason why it needs to be done in one step?
> >
> > If not faster, at least easier to read/debug.
> >
> -------------------------------------------------------------------------
>
> I disagree with the SPEED statement, and if you find it difficult
> to manage
> it's complexities then .........
>
> --
> Stephen Russell
> Sr. Production Systems Programmer
> Mimeo.com
> Memphis TN
>
> 901.246-0159
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to