Back To Basics: Functions, the good and the bad

Functions are create little blocks of code. They are fantastic for converting data from one format to another, or for looking up other values based on a lookup. However this comes at a price. That price is CPU power. Doing all these additional lookups can cause extra strain on the database server. It’s often better for the database server to simply join to the table which you are doing the lookup against. However you can guarantee the same lookup is done every time when a function is used.