Why this query is fast

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

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

  • @peterhahne2035
    @peterhahne2035 2 года назад +35

    Am I missing something or is uniqueness a game breaker here? Since B is not a primary key we have no guarantee on the uniqueness and therefore we might have millions of records between 50 and 50000

    • @hnasr
      @hnasr  2 года назад +6

      That is a great point for sure 👍

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

      Oh good point! I didn't even think of that. I was only thinking in terms of the index.

  • @joseortiz_io
    @joseortiz_io 2 года назад +13

    Good stuff my guy. It’d be great to have some visuals with the type of discussions just to bring the point home. Anyway, I appreciate these videos a lot. Thanks Hussein! 😁

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

    It's 'analyze table' in PostgreSQL, mostly paired with vacuum as far as I use it :)

  • @mylorgolden8146
    @mylorgolden8146 2 года назад +46

    I am continuing to Add to my portfolio. As warren Buffet said "be brave when everyone else is fearful ". The stock market ALWAYS recover, so hold for long term and have the stomach for the ride 👍.

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

      Mrs Sarah really is doing a lot of people a genuine favor with her daily signal! I've earned alot also

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

      saw recommendation but I did not bother chating her up

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

      Wow i'm glad i did. I withdrew my first profit two days ago now I have another ongoing trade with her

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

      The fruitfulness of your trading lies on the account manager or the expert

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

      I have been seeing so many recommendations about Mrs Sarah on different platforms trending I think she must be good for people to talk about her

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

    IF, A was not a primary key but had a clustered index , then what ? Once you find page for value 50 by doing a primary index scan for the value you got from A's index, every consecutive items in the page and the consecutive pages will have the required data (since it's clustered). BUT, is the database smart enough to know that it doesn't need to scan the primary index for each of the values which it finds in A's index ?

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

    @hnasr , if possible can you please do some live coding for building backend systems?

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

    pretty sure in postgres ANALYZE updates table stats

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

    We can explore internals on primary index built from multiple columns, maybe there is something interesting there

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

      I think that it's built with just concatenated values of columns

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

      @@weathercontrol0 how would you concatenate different data types, like date and uint and enum?

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

      @@MartinsTalbergs after all, it's all just bytes, I don't think there's a problem concatenating different data types

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

      @@weathercontrol0 there should be a problem, because an index has to be built... Naively, sure - they could do basic BTREE of zeroes and ones

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

    This was so much fun!

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

    nice video, can you make one with the books from bookshelve explaining them?

  • @essamolwan539
    @essamolwan539 2 года назад +5

    Nice haircut. You look good.

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

    There's a typo in your chapter titles btw

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

      Thanks fixed!

  • @abcdef-bz7ew
    @abcdef-bz7ew 2 года назад +2

    First to comment

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

    Early

  • @oleksandrlytvyn532
    @oleksandrlytvyn532 2 года назад +2

    Hello, Just watched your video course on HA Proxy --> it's really good quality content. Thanks a lot for doing it 🙂