Skip to content

panoschron97/Performance_tuning_and_partitioning_for_better_performance_MySQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Performance tuning and partitioning for better performance in MySQL

This repository provides scripts and resources for optimizing MySQL database performance through performance tuning techniques and partitioning strategies. It aims to demonstrate how to improve query speeds and manage large datasets effectively.

✨ Features

  • Performance Tuning: SQL script demonstrating various performance tuning techniques applicable to MySQL databases.
  • Partitioning: Examples of different partitioning methods (HASH, KEY, LIST, RANGE, SUBPARTITION) to manage and query large datasets more efficiently.
  • Data Loading: Sample CSV files and SQL scripts for loading data into partitioned tables.
  • Comprehensive Examples: Detailed SQL scripts showcasing the implementation and benefits of performance tuning and partitioning.

πŸ“š Table of Contents

πŸ› οΈ Installation

  1. Clone the repository:

    git clone https://github.com/panoschron97/Performance_tuning_and_partitioning_for_better_performance_MySQL.git
    cd Performance_tuning_and_partitioning_for_better_performance_MySQL
  2. Install MySQL:

    Ensure you have MySQL installed and running. You can download it from the official MySQL website.

  3. Create Databases:

    Create the necessary databases (dbparticion1, stackoverflow) using the MySQL command-line tool or a GUI like MySQL Workbench.

    CREATE DATABASE IF NOT EXISTS dbparticion1;
    CREATE DATABASE IF NOT EXISTS stackoverflow;
  4. Import Sample Data:

    Import the BK_stackoverflow_users.sql script into the stackoverflow database and the employees_sample_data.csv and employees_data.csv files into corresponding tables within the dbparticion1 database after creating those tables using the appropriate SQL scripts. Ensure local_infile is enabled for your MySQL instance to allow importing data from local files.

πŸš€ Usage

  1. Navigate to the directory containing the SQL scripts:

    cd Performance_tuning_and_partitioning_for_better_performance_MySQL
  2. Execute SQL scripts using the MySQL command-line tool:

    mysql -u your_mysql_username -p < Partitioning/partition_by_hash/panos.sql
    mysql -u your_mysql_username -p < Performance_Tuning/panos.sql

    Replace your_mysql_username with your MySQL username.

  3. Refer to the comments within the SQL scripts for step-by-step instructions and explanations of each performance tuning or partitioning technique.

🧰 Dependencies

About

Performance tuning and partitioning techniques for querying fast data with the most possible less cost in MySQL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published