Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/byhbt/laravel-database-indexes
Mockup app for review database index
https://github.com/byhbt/laravel-database-indexes
Last synced: about 6 hours ago
JSON representation
Mockup app for review database index
- Host: GitHub
- URL: https://github.com/byhbt/laravel-database-indexes
- Owner: byhbt
- Created: 2020-02-05T09:31:27.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T06:30:50.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T17:37:23.025Z (over 1 year ago)
- Language: PHP
- Size: 2.51 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Setup
This is init data script for preparing data to learn database index.
```
php artisan migrate --seed
```It might take a little time because we init 300k row for user_video table.
## Review
1. Use ```EXPLAIN``` statement to see what type of MySQL index and how many rows it perform the queries.
2. Remove/Add index to **user_id** in **user_video** table, too se the different in performance.
3. Query the time range in the **user_video** table
- Index type = range
![MySQL Workbench](https://user-images.githubusercontent.com/948856/73829371-68fb7d00-4835-11ea-952d-4e9cdfb2279d.png "MySQL Workbench")
## Reference:
- [https://vanseodesign.com/web-design/the-types-of-indexes-you-can-add-to-mysql-tables/](https://vanseodesign.com/web-design/the-types-of-indexes-you-can-add-to-mysql-tables/)
- [https://dev.mysql.com/doc/sakila/en/](https://dev.mysql.com/doc/sakila/en/)## License
The app is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).