Mysql Index Tutorial | Make websites 100 Times Faster!!! Query time from 2 Sec to 3 Milli Seconds

Mysql Index Tutorial | Make websites 100 Times Faster!!! Query time from 2 Sec to 3 Milli Seconds

36.647 Lượt nghe
Mysql Index Tutorial | Make websites 100 Times Faster!!! Query time from 2 Sec to 3 Milli Seconds
Here I'll show how we can speed up our Mysql Queries using MySQL indexes. We'll convert queries that take over 2 Seconds to under 3 Milli Seconds. Create Index: https://dev.mysql.com/doc/refman/5.7/en/create-index.html Drop Index: https://dev.mysql.com/doc/refman/5.7/en/drop-index.html Create table: https://dev.mysql.com/doc/refman/5.7/en/create-table.html Alter Table: https://dev.mysql.com/doc/refman/5.7/en/alter-table.html Mysql Indexes allow us tell Mysql databases to index specific columns. This works similar to how regular indexes work in books. Similarly, when DB tables are indexed, Mysql searches in the index column to return the data. This is faster since it does not crawl through each row, but instead uses binary search to get the results. Mysql by default uses B-Tree index on all indexed columns. In this Mysql Index Tutorial, we will create index on a table with close to 3 million records. We will use index on single column and on multiple columns and see the time differences. Here we will also how Mysql Indexes work and how Binary search concept is used in the Mysql Index. SUBSCRIBE: https://www.youtube.com/channel/UCvrnQcFaGHw0kwm9chkzXtw?sub_confirmation=1