POV-Ray : Newsgroups : povray.off-topic : The Daily WTF [again] : Re: The Daily WTF [again] Server Time
13 Jul 2025 23:39:47 EDT (-0400)
  Re: The Daily WTF [again]  
From: Jeremy M  Praay
Date: 12 Feb 2008 08:54:50
Message: <47b1a52a@news.povray.org>
"Invisible" <voi### [at] devnull> wrote in message 
news:47b166c6$1@news.povray.org...
> Darren New wrote:
>
>> Nowadays, I get stuff that's too complicated to do that. Several 
>> instances of looping over a result set and building a "Select from X 
>> where X.blah in (....)" where the .... is built programatically based on 
>> another SQL call.  Or places I'm pretty sure I could figure out but don't 
>> have the half a day to spend.  Or stuff I'm pretty sure SQL can do, but I 
>> can't figure out how to (mostly with GROUP-BY selection type stuff).
>
> Given time, you could probably integrate the entire thing into one giant 
> SQL statement. You'd probably find that you can actually simplify it down 
> to something rather smaller once it stated all in one operation. And that 
> the DB engine can do some pretty impressive optimisations after that too.
>

In the application I work on, we produce Financial Statements (not solely, 
but as part of the overall application).  In the old application, this 
involved several SQL statements, each run at various times, as the 
application traversed a simple SQL statement.  Part of the problem was bad 
database design in the old system.  In our new system, it took us perhaps 3 
days, but we was able to combine it all into one long SQL statement.  It was 
the hairiest SQL I'd ever seen, but it now produces statements in seconds, 
whereas the old system would take several minutes.

I'm not an SQL guru by any means, and the knowledge that I gained in those 3 
days was enormous.  It helped me to understand what SQL was actually capable 
of, rather than simply assuming, "SQL can't do that!"  And moving forward to 
other reporting nightmares made many of these new issues seem almost trivial 
by comparison.

It made me a better developer as well as producing a better product for the 
consumer, but the company I work for has a difficult time understanding the 
long term benefit, very much like Gail and others have stated in this 
thread.  Sometimes I even have to hide my time while I make something 
better, for fear of getting reprimanded.  If feature A gets implemented 
quickly, I spend time fixing B to make up the difference, but then don't 
report it.  It's sad.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.