Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
Physical Tuning
Lecture 10
24 November 2014 Physical Tuning 1
Physical Tuning Lecture 10 Physical Tuning 24 November 2014 1 - - PowerPoint PPT Presentation
Wentworth Institute of Technology COMP570 Database Applications | Fall 2014 | Derbinsky Physical Tuning Lecture 10 Physical Tuning 24 November 2014 1 Wentworth Institute of Technology COMP570 Database Applications | Fall 2014 |
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 1
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 2
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 3
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
– Queried = good for indexes – Updated = bad for indexes – Unique = should be indexed
– 80/20 rule -> effective profiling
– E.g. must complete within X seconds
– Storage allocation – I/O performance – Query execution time
24 November 2014 Physical Tuning 4
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 5
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 6
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 7
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 8
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 9
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 10
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 11
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 12
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 13
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 14
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 15
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 16
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 17
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 18
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
24 November 2014 Physical Tuning 19
Wentworth Institute of Technology COMP570 – Database Applications | Fall 2014 | Derbinsky
A query with multiple selection conditions that are connected via OR may not be prompting the query optimizer to use any index. Such a query may be split up and expressed as a union of queries, each with a condition on an attribute that causes an index to be used. For example, SELECT ¡Fname, ¡Lname, ¡Salary, ¡Age7 ¡FROM ¡EMPLOYEE ¡ WHERE ¡Age ¡> ¡45 ¡OR ¡Salary ¡< ¡50000; ¡ may be executed using table scan giving poor performance. Splitting it up as SELECT ¡Fname, ¡Lname, ¡Salary, ¡Age ¡FROM ¡EMPLOYEE ¡ WHERE ¡Age>45 ¡ UNION ¡ SELECT ¡Fname, ¡Lname, ¡Salary, ¡Age ¡FROM ¡EMPLOYEE ¡ WHERE ¡Salary ¡< ¡50000; ¡ may utilize indexes on Age as well as on Salary ¡
24 November 2014 Physical Tuning 20