• SQLZ (5/31/2011)


    However, I would still give consideration to including this field in the actual table so that you wouldn't need to perform the calculation when trying to query many thousands of rows. Instead you'd only need to perform the calculation whenever you insert a record into the table.

    Horses for courses. This is a good principle, but some environments simply won't allow it -- whether it's because the database is owned by a third-party app that won't allow changes to tables, or because it's a hybrid transactional/analytical database and a delay of 12 seconds in running a report is preferable to a delay of .1 second when adding/updating a transaction.

    If it weren't for non-standard requirements, we'd all be out of a job. 😛