Deploying Materialized Views
- Add database indexes
- Check the execution-plan to see if the query can be changed (or indexes added) to avoid table-scans
- Consider striping the hard disk
- Consider sharding the data (splitting it by key into multiple partitions)
- Upgrade to faster storage (e.g. RAID or SAN or SSD's)
- Replicate tables to split up high-demand-accesses, thus lowering the queue wait times
Some databases, for example Oracle, include MV's. SQL-Server has Indexed Views, which can help with performance, but are not quite as powerful. MySQL does not currently have MV's.
The Web site www.comparehybridcars.net/MV gives a detailed example of how to create an MV in both MySQL and SQL-Server, including how to write triggers to automatically maintain it.
No comments:
Post a Comment