Chapter 13. Best Practices


In this chapter, you will learn how to

  • Create optimal tables and indexes

  • Create easily maintainable code

  • Code with performance in mind

  • Work more efficiently with result sets

To start off, it is important to recognize that there are different types of best practices. A best practice can be a programming guideline that enables easier maintenance through standardized coding techniques, code readability, and code documentation through the use of comments. Alternatively or additionally, a best practice can be a guideline to ensure that you receive the maximum performance from your system resources.

Sometimes these practices compete with each other, and you have to choose one over the other. For example, often performance-related practices are specific to an operating system and are very focused on one platform. If you have a requirement to develop applications that are portable across platforms, it may not be easy to implement a performance-related best practice having IF conditions in your code, or creating multiple code bases targeted at different platforms.

With that said, the implementation of the best practice is left to you, depending on your specific requirement and circumstance.

In this chapter, a variety of best practices will be discussed. First, some features of tables and indexes are examined to help improve performance. Next, we mention things you can do while coding to make sure that your SQL procedure is easy to read and maintain, keeping performance in mind. Finally, we touch upon the topic of result sets.



    DB2 SQL PL. Deployment and Advanced Configuration Essential Guide for DB2 UDB on Linux., UNIX, Windows, i5. OS, z. OS
    Intelligent Enterprises of the 21st Century
    ISBN: N/A
    EAN: 2147483647
    Year: 2003
    Pages: 205

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net