Chapter 1: Tuning the DatabaseIn This Chapter✓ Examining the work to be done✓ Contemplating physical design considerations✓ Choosing and clustering in
588 ✦ An OR connective in the WHERE clause could cause a problem. ✦ If you expect the optimizer to select a fast but sophisticated, plan, you could be
Book VIIChapter 1Tuning the Database589Separating User Interactions from TransactionsBecause computer instructions operate in the nanosecond realm and
590Book VII: Database Tuning Overview40_9780470929964-bk07ch01.indd 59040_9780470929964-bk07ch01.indd 590 2/24/11 3:45 PM2/24/11 3:45 PM
580Analyzing the WorkloadOptimal design of a database depends largely on how the database will be used. What kinds of queries will it be subjected to?
Book VIIChapter 1Tuning the Database581through the table until you come upon the record you want. This feature can be a tremendous time-saver for a qu
582Choosing the Right IndexesIndexes can improve the performance of database retrievals dramatically, for several reasons. One reason is that an index
Book VIIChapter 1Tuning the Database583on EMPLOYEE.DepartmentID usually performs best. The number of rows in the EMPLOYEE table is sure to be larger t
584Consider the following example:SELECT DeptNoFROM EMPLOYEEWHERE EMPLOYEE.Age > 29 ;You can use a B+ tree index on Age to retrieve only the rows i
Book VIIChapter 1Tuning the Database585Figure 1-1 reveals a few things about the cost of indexes: ✦ A clustered index always performs better than an u
586If you suspect that an index might be doing you more harm than good, run some test queries with the index both present and absent. Use the results
Book VIIChapter 1Tuning the Database587For best results, tuning indexes must be an ongoing activity. As time goes on, the nature of the workload is bo
Commenti su questo manuale