18.3. Summary

This chapter provided an overview of some of the techniques you can employ to improve the solution's overall performance. Although there are no "silver bullets," including these patterns and practices in the design (and, of course, in the implementation) will help greatly. It is often the simplest things that provide the greatest result. Including the patterns and practices from this chapter early will alleviate performance tuning and, more important, re-factoring, which could ripple through all the components in the solution, as discussed in Chapter 2.

The following are the key points to take away from this chapter:

  • Include indexes on tables. Indexes improve the performance of database queries. You should review the query's WHERE clauses and JOIN statements to determine the best indexes to include. Remember, the more indexes you have on tables will affect the performance of INSERT, UPDATE, and DELETE operations.

  • Partition tables. Partitioning tables can improve the overall performance of the application. Again, you should review how the database is accessed to determine the most appropriate partitions and partitioning keys. Remember, partitioning should also take into account reporting and batch components.

  • Optimize queries. The database queries you develop should be optimized. You should generate execution plans for queries based on a reasonable set of data. The following lists the do's and don'ts for queries:

    • Do include locking hints.

    • Do select the minimum amount ...

Get Design – Build – Run: Applied Practices and Principles for Production-Ready Software Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.