Re: SQL statement question

From: Joe Celko (joe.celko_at_northface.edu)
Date: 03/05/04


Date: Fri, 05 Mar 2004 12:11:38 -0800


>> have always thought order of evaluation in CASE expressions is
always top to bottom. If that's true, then one can save a few CPU
cycles: <<

Yep! I saw that after I posted what makes this more embarassing is that
I have a tutorial example in which there are four possible cases and one
of them has an ugly bit of logic.

I first do it with the complex case in the first WHEN clause, followed
by the others. Then I re-arrange the WHEN's so that the complex WHEN
becomes the ELSE because the three simple cases exhausted everything.

"We must fall back upon the old axiom that when all other contingencies
fail, whatever remains, however improbable, must be the truth." --
Sherlock Holmes

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Atmel releasing FLASH AVR32 ?
    ... A dual thread 40 MHz CPU can replace two 20 MHz CPUs. ... that a thread can only run max 1/2 or 1/3rd of the cycles ... switch at the start of the pipeline, ... equivalent to the interrupt latency. ...
    (comp.arch.embedded)
  • Re: Apple II Disk Drive Question
    ... derived from the Apple II CPU clock which runs at ... which will write one bit every four CPU cycles, ... adjusting the speed of the two drives to create the necessary ... know the rotation speed of both the writing and reading drives, ...
    (comp.sys.apple2)
  • Re: Adjusting PC Hyperthreading for Spice Simulation
    ... 3 instructions (or 3 cycles' worth of instructions) per CPU ... PPro upwards can execute multiple load/store ... 1100 MHz to 1400 MHz CPU cores had appeared we had DDR 333 ram. ...
    (sci.electronics.design)
  • Re: Apple II Disk Drive Question
    ... which will write one bit every four CPU cycles, ... disk is spinning. ... adjusting the speed of the two drives to create the necessary ...
    (comp.sys.apple2)
  • Re: interactive task starvation
    ... Where exactly are those extra cycles going I wonder? ... blows my mind though for reasons I've just said. ... in other processes which are starvating the CPU (eg: ... as no other workload has been identified. ...
    (Linux-Kernel)