Use mathematics to optimize T-SQL code
Editor's Note. Send your experts-only T-SQL tips to Itzik Ben-Gan at blackbelt@sqlmag.com. If we use your tip in the magazine, you'll receive $100 and an exclusive T-SQL Black Belt shirt.
In "Adding Performance," May 2001, I showed how a biological testing facility approached a certain business problem by using a mathematical equation that converts summation to multiplication. That example had specific requirements, which...