Re: Why use USING? (was Re: ORDER BY ?, ?, ? DESC)
Posted in 1995
rodney, basically for speed. your method of preparing a string for every time the values change requires a new prepare/optimization/etc of the string. however, when using the USING construct, you prepare/optimize the string once (with the ? place holders)... > > At the risk of sounding stupid (what else is new?), does one ever > _have_ to use USING? Is it ever _better_ to use USING? > > Even in a looping situation, I can't imagine that the performance > is that much different (but that may be where I'm way off). > > It seems like I used USING a lot when first starting in 4GL, but > later almost exclusively built a character string out of the > changing variables (redundant, no?) and PREPAREd that. > > Anyone? > > Thanks, > rodney > -- regards, +----------------------------------------------------------------------------+ | . . | Bob Baskett | | ... ... | Software Engineer | | ..... ..... | Business Systems Integration Group | | .. ... .. | Semiconductor Products Sector | | . . . | Mesa, AZ | | | President, Informix Users Group Of Arizona | | Motorola, Inc. | | +----------------------------------------------------------------------------+ | Sun 690MP 4.1.3, Online 5.01, 4.10.UD1 Tools, Fourgen v4.10.UC1 | +----------------------------------------------------------------------------+