Why Database Tuning?
It is a primary responsibility of a performance Engineer to provide tuning recommendations for a database server when it fails to respond as expected.
Performance tuning can be applied when you face the following scenarios:-
- If the real user waiting time is high
- To keep your database updated on par with your business
- If you want to use your hardware optimally
- SQL Query Optimization:-
The following types of SQL Queries are suggested to use
✔ Avoid table scan queries – especially long table scans.
✔ Utilize the indexes promptly.
✔ Avoid complex joins wherever possible – especially unions.
- Memory Tuning
The theme behind this is - A read from (or) write to memory is much faster than a read from (or) write to disk.
For efficient Memory
✔ Ensure that the buffer hit ratio, shared pool (library and dictionary hit ratio) meet the recommended levels.
✔ Properly size all other buffers including the redo log buffer, PGA, java pool, etc.
- Disk IO Tuning
Spreading data across disks to avoid I/O contention
✔ You can avoid bottlenecks by spreading data storage across multiple disks and multiple disk controllers:✔ Put databases with critical performance requirements on separate devices. If possible, also use separate controllers from those used by other databases. Use segments as needed for critical tables and partitions as needed for parallel queries.
✔ Put heavily used tables on separate disks.
✔ Put frequently joined tables on separate disks.
✔ Use segments to place tables and indexes on their own disks.
✔ Ensure that indexes are properly tuned.
- Sorting Tuning
- Operating System Concerns
- Lock Contention
- Wait Events
Conclusion
In an actual Load Testing, it is an essential practice to simulate the database as in production. Due to this, a lots of database issues may be encountered. The above given solutions are general tuning mechanisms for any database. These solutions may be ideal for most of the performance issues in a database.Thanks For Reading This Blog. Please Visit At: Database Tuning Know More
0 comments:
Post a Comment