POV-Ray : Newsgroups : povray.off-topic : The Daily WTF [again] : Re: The Daily WTF [again] Server Time
13 Jul 2025 09:26:10 EDT (-0400)
  Re: The Daily WTF [again]  
From: Darren New
Date: 12 Feb 2008 01:02:02
Message: <47b1365a$1@news.povray.org>
nemesis wrote:
> in my place, people seem to love using cursors and manually looping over it
> rather than using a simpler and much faster INNER JOIN.

I took over (technically) at one place and made the rule that such was 
disallowed. You were not allowed to loop over a result set and put its 
contents into another SQL call. I sometimes spent half a day figuring 
out the right SQL to accomplish something, but I got it working about 
six times as fast.

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

-- 
   Darren New / San Diego, CA, USA (PST)
     On what day did God create the body thetans?


Post a reply to this message

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