Mysql Index Tutorial | Make websites 100 Times Faster!!! Query time from 2 Sec to 3 Milli Seconds
Vložit
- čas přidán 17. 10. 2020
- 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: dev.mysql.com/doc/refman/5.7/...
Drop Index: dev.mysql.com/doc/refman/5.7/...
Create table: dev.mysql.com/doc/refman/5.7/...
Alter Table: dev.mysql.com/doc/refman/5.7/...
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: / @technotrax - Věda a technologie
Thanks, brought my query from 40 seconds to 200 ms on a table with 12 million entries
Excellent explanation on this topic. Thanks so much!
Thanks mate, was avoiding to learn this as couldn't find such simple example. 😁✌
Perfect Explaining Thanks Dude !
Exactly, This is the solution of what I was looking for
Great video, Thanks a lot !!
Really great and simple video
This video helped me take a query from 25 seconds to 0 seconds! Thank you!
The query has been cached...
How to do cache query? Using redis??
very useful video, thank you!
What are the guidlines for desinging index on a table.? I mean for example, how many columns can I index, what are the best kind of columns to add an index, what are the NEVER DO on index g design? If someone have info about that I'll appreciate
Nice Explanation
Bro this is a quality video thanks you. you should make more video.
Life saver video.
Good explanation!
Will this still work if we use LIKE operator for querying data
Your video is so great. Can you post the .sql file on because i want to practice this. Thanks so much ❤️
FOR EX. MY TABLE SIZE IS 300GB THEN INDEXES ARE WORKING FING OR ANY ALTERNATE WAY IS THERE IN MYSQL? PLZ SUGGEST ME
Can you please share the .sql file for practice? Thanks in advance
Hi sir sorry hope you can help me i want to apply this tutorial on my simple website to speed up the result everytime i hit search button. Ive already add index. I mean its working using mysql but not working in my website ? But when i drop the table the button is working again. Thank u God bless
How about indexing date column?
PERFECT!!
Thank you so much
Thanks a lot for this tutorial, you helped me a lot.
You're welcome!
I've tried your tutorial, but it does not give me an effect. I don't know why, but maybe cause my table only contain 2035 rows data, so i can't feel the effect of index. Can I get that table please? I wanna try it on my localhost.
Which is your editor or client?
hi. we are getting an FATAL error when we update any data. Can you please help.
Thank you
Its good, please make a tutorial on mysql cpu/ram configuration
Wow now i became expert also
thank you
I got this error (Error Code: 1071. Specified key was too long; max key length is 3072 bytes)
❤❤
Those queries are running with MySQL cache…. Those aren’t the correct results.
this is not valid way to index to any varchar
Thank you query faster
I need a simple script. Search query from 100 million rows faster way? Budget $50
Make partition and index
หัวจัย