MySQL: INDEXES are awesome

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 24

  • @BroCodez
    @BroCodez  2 года назад +28

    -- INDEX (BTree data structure)
    -- Indexes are used to find values within a specific column more quickly
    -- MySQL normally searches sequentially through a column
    -- The longer the column, the more expensive the operation is
    -- UPDATE takes more time, SELECT takes less time
    -- Single column index
    CREATE INDEX last_name_idx
    ON customers (last_name);
    -- Multi column index
    CREATE INDEX last_name_first_name_idx
    ON customers (last_name, first_name);

  • @vinayaksingh524
    @vinayaksingh524 2 года назад +9

    Hey bro ! Loving the new style of content+ thumbnails , it's really neat and to the point.

  • @innocentomoyibo6312
    @innocentomoyibo6312 Год назад +7

    I hit the like button before I even watched the video because I knew I wasn't going to be disappointed, it's Bro code after all😂

  • @eln_ty_34_snehalsura74
    @eln_ty_34_snehalsura74 Месяц назад

    You are one of the best teachers on the RUclips

  • @Esteapen
    @Esteapen Год назад +10

    This is so cool but I have some questions:
    1.) What if the table often UPDATES and also SEARCHES? Does it still applicable to add an INDEXED COLUMN?
    2.) If I were to UPDATE a table with one of its column was INDEXED (but I'm not going to UPDATE the INDEXED column nor use it for WHERE condition) does it still affects the processing time?
    I hope someone will help me clarify. Thank you in advance!

    • @DroisKargva
      @DroisKargva Год назад +3

      1) You have to find balance between search and update. Typically in data warehouse you would want more indexing (because its used for SELECT statements) while you would want less indexing for Database. Ultimately you would want to find balance in your scenario.
      2) This is good question. I am not quite sure. Would like to know answer as well.

  • @cymaco_ytb8620
    @cymaco_ytb8620 7 месяцев назад

    super cette petite vidéo notamment nous y retrouvons une explication très développé et simple ce qui facilite l'aprentissage, merci de subvenir a nos besoins d'aprentissage et continuez vos vidéos pour apprendre plus au jeunes comme moi.

  • @pegalolz
    @pegalolz 2 года назад

    thanks brother im presenting a cybersecurity project in 4 days and i needed this

  • @shriharikulkarni07
    @shriharikulkarni07 10 месяцев назад

    Can you please explain indexes on joins and group by etc

  • @amanthakur6913
    @amanthakur6913 2 года назад +1

    You have really came a long way bro

  • @eln_ty_34_snehalsura74
    @eln_ty_34_snehalsura74 Месяц назад

    Hi bro, please also upload the videos on Flask

  • @maximillianquaife-larsen3799
    @maximillianquaife-larsen3799 8 месяцев назад

    Best video on the ropic

  • @jagannathgaidhani5333
    @jagannathgaidhani5333 Год назад

    your MySQL workbench platform UI looks very clean! how did you do that ? mine looks very unappealing
    can you plz tell me settings options ?

  • @geniushomwetv9793
    @geniushomwetv9793 Год назад

    Well Explained❤

  • @diegogouveia1137
    @diegogouveia1137 Год назад

    Hey bro, nice content

  • @georgemilev4831
    @georgemilev4831 Год назад +1

    I like the video but it would have been great if you showcased it with a bigger dataset.

  • @UddhikaIshara
    @UddhikaIshara 4 месяца назад

    Thank you

  • @tomatentheo7198
    @tomatentheo7198 Год назад

    Is it possible to crate a Index over multiple tables?
    For Example if i had two tables with unique keys and aggregate those to get a faster result set?

    • @junior.santana
      @junior.santana Год назад

      How would you "aggregate" those tables?
      An index is created per table, but let's say you want to perform any kind of Join then you can (likely should) create an index on the secondary keys to help MySQL find the records on the "joined" table.
      If you want to perform a Union then they are actually two queries being executed in a sequence, both of which could have their own specific keys.
      I'm not sure about what cenario you're thinking about, let me know if that helps

  • @calebadinfono7758
    @calebadinfono7758 10 месяцев назад +1

    The like counter was at 666. Had to drop a like to change that. Thanks for the video🙏

  • @Hallandfan847
    @Hallandfan847 2 года назад +1

    yoo 2nd

  • @feliciaf8
    @feliciaf8 Год назад

    so if i use only the first name, then the last_name_first_name_idx won't be used?