Faster queries with ZERO code changes!

Sdílet
Vložit
  • čas přidán 8. 09. 2024
  • Typically the performance of just a few critical queries is the one thing that will make (or break) the reputation of your application. You can use data clustering to make sure those critical queries always run fast.
    Follow me!
    blog: connor-mcdonal...
    twitter: / connor_mc_d
    The Podcast!
    podcasts.apple...
    open.spotify.c...
    Subscribe for new tech videos every week
    Other social media channels here: linktr.ee/connor
    Music: The Wine, The Cars, Ah! Montmartre! - Late Night Feeler
    Image credit: commons.wikime..., Igor Chuxlancev
    #sql #database

Komentáře • 15

  • @eddiehapson1730
    @eddiehapson1730 Před rokem +1

    You're a savior man! Thanks 🙏🙏🙏

  • @vikasns4603
    @vikasns4603 Před rokem +1

    What happens to the new rows that are inserted? Will they be placed in the right place? Or is clustering an one time activity only? And that's the difference between clustering and partitioning?

    • @DatabaseDude
      @DatabaseDude  Před rokem +1

      direct mode operations observe the clusteing (ctas, insert-append, alter table move )

  • @johankuster1377
    @johankuster1377 Před rokem +2

    We just moved from 11 to 19. Some organizations only move when they have to. This is certainly one option I am going to try out very soon. Thanks!

  • @perttif6390
    @perttif6390 Před rokem

    Fantastic! Thanks Connor.
    Can this be combined with partitioning on some other key, say order date (year)?
    Maby not relevant for the case of an order table but for other cases.

    • @vikasns4603
      @vikasns4603 Před rokem

      Don't this so, You can arrange the data physically in only one way.

  • @yuri_p8984
    @yuri_p8984 Před rokem +2

    Thank you, Connor, for sharing knowledges :) !

  • @amitbajaj1995
    @amitbajaj1995 Před rokem +1

    wow, what a way to optimize the physical reads

  • @Elfcheg
    @Elfcheg Před rokem

    Can I have similiar results by exporting a table and then importing it back with an "order by" clause?

    • @DatabaseDude
      @DatabaseDude  Před rokem +2

      not sure what import option you are referring to. A CTAS with an ORDER BY would do it

    • @Elfcheg
      @Elfcheg Před rokem

      @@DatabaseDude Thanks! That's what I had in mind.
      I meant "export with order by and then import" :)

  • @sriramjaisankar9121
    @sriramjaisankar9121 Před rokem

    This is so good and also reduced my burden.
    How to get the Statistics of a query? I can't get that.