Contains the necessary sources to execute the explain plan
- Docker and Docker-compose must be installed into your system.
Installed version that I have used is:
$ docker --version
Docker version 20.10.21, build baeda1f
$ docker-compose --version
Docker Compose version v2.13.0
- Open any of your favorite terminal (I have used zsh)
- Clone the repo https://github.com/VikashChoudahry/db-explain-plan.git
- Navigate to the directory "db-explain-plan/mysql"
- Run:
docker-compose up
Output: MySQL database must be up and running.
- Open MySQL Workbench (have installed 8.0)
- Click on MySQL connection(+ icon)
- Used the following details to connect to the database:
- Hostname: 127.0.0.1
- Port: 3306
- Username: root
- Password: changeme (just for learning purpose. It has to be strong password if it's being used for any of the live project)
Output: You must be connected to the database with default schema(s).
- Ensure that you are on Workbench.
- Click on "Administration" tab within Workbench.
- Select Data Import/Restore option
- Select "Import from Self-Contained" file
- Select the schema file from "db-explain-plan/schema/classicmodels.sql"
- Select "Dump Structure and Data" from the dropdown (you may see at the bottom).
- Select "Start Import"
Output: You must be seeing "classicmodels" database created.
- Open MySQL Workbench
- Open classicmodels.mwb
Output: This will open ER diagram as a model in your MySQL workbench.
Related to the EXPLAIN, most of the details are added as part of the "db-explain-plan/docuementation/MySQL - Query Optimization Understanding.pdf" document.
Don't worry! Please leave your query here - https://www.learnandshare.live/contact
Happy learning and sharing!