This is a college project on database system tuning and query optimization.
-
The SQL database filling scripts and NoSQL collections can be found in this GDrive folder.
-
Make sure to disable foreign key checks bfore running SQL scripts :
SET FOREIGN_KEY_CHECKS=0;
.
-
Schema Optimization :
- Normalization/Denormalization.
- Data types optimization.
-
Memory and Cache Optimization :
- Hardware Specs.
- Stored Procedures.
-
Index Optimization :
- Indexes Generation on Non-Primary Keys.
- UNION is better than OR with Indexes.
-
Query Optimization :
- Unnecessary Conditions Elimination.
- UNION ALL instead of UNION.
-
Non-optimized SQL vs. Optimized SQL (100,000).
-
Optimized SQL vs. NoSQL (100,000).
-
Different Sizes of Optimized SQL (10,000 / 100,000 / 1,000,000).
-
Different hardware on Optimized SQL.
- To clear disk cache for database :
chmod +x clear_cache.bash ./clear_cache.bash