SQLite's WAL mode is fast fast

Поділитися
Вставка
  • Опубліковано 13 жов 2024

КОМЕНТАРІ • 81

  • @typecraft_dev
    @typecraft_dev 3 місяці тому +37

    came for the thumbnail. stayed for the content

  • @haradalucas
    @haradalucas 3 місяці тому +12

    I thought Laravel would've default my DB to WAL mode, but turns out it didn't. I've since fixed it thanks to this video :)

  • @ahmad-murery
    @ahmad-murery 3 місяці тому +16

    I feel the need to open up a SQLite DB and play with it 😎
    Thanks Aaron!

  • @vikingthedude
    @vikingthedude 3 місяці тому +26

    I love kicking it back with the boys and talking about men’s favourite topics: sports, boobs and sqlite

  • @kasmanialisaad
    @kasmanialisaad 3 місяці тому +6

    The course is amazing. Highly recommend it. Can’t wait for the last modules!

  •  2 місяці тому +2

    Now I can be the coll guy explaining WAL mode to all the people! Thank you!

  • @mortjac
    @mortjac 3 місяці тому

    What a wonderful dinner story. And BTW, the storyteller isn’t bad either 😅
    I saw all your videos in your preparation phase, and I’m delighted to see your take on SQLite wal- mode.
    Congratulations 🎉🎉🎉

  • @SimoneFolador
    @SimoneFolador 3 місяці тому

    Thanks Aaron! I didn't know the details of WAL mode. I will definitely check it out on my projects. Great video, as always!

  • @higiniofuentes2551
    @higiniofuentes2551 25 днів тому

    Thank you for this very useful video!

  • @nullzeon
    @nullzeon 3 місяці тому

    I literally level up as a dev everytime I watch! love it here! TryHard Studios! ❤❤❤

  • @davidharting3119
    @davidharting3119 3 місяці тому

    Watching this while enjoying a nice cold water

  • @sudhanshubhagwat9538
    @sudhanshubhagwat9538 3 місяці тому +1

    Hi Aaron, loving the course. Is there purchase power parity for buying the course for India? Would love to buy the course. Keep up the good work

  • @mme725
    @mme725 3 місяці тому

    I would love to see this benchmark ran with all 6 journal modes. (Obviously OFF wouldn't be useful for production, but it would be an interesting point of comparison)

  • @OldKing11100
    @OldKing11100 3 місяці тому

    Excellent baseline test. If you don't mind me asking: What is your take on the future of WAL2 + CONCURRENT for SQLite?

  • @Majiy00
    @Majiy00 2 місяці тому

    Great video, you really deserve more views and subscriber 😊😊

  • @CapitaineToinon
    @CapitaineToinon 3 місяці тому +5

    Relatable opening

  • @Bess_Gates
    @Bess_Gates 2 години тому

    thank you man

  • @jesper.ordrup
    @jesper.ordrup 3 місяці тому

    Extremly clear explanarion of Wal. Thanks 🎉
    Have u tried pocketbase?

  • @AhmedSalah-xm9xu
    @AhmedSalah-xm9xu 3 місяці тому

    Hey Aaron, are you going to continue streaming the development of your life OS?
    I really enjoyed the content. Keep up the great work👍👍👍

  • @Kane0123
    @Kane0123 3 місяці тому +1

    Classic cold water conversation - SQLite config options.

  • @jannismilz
    @jannismilz 3 місяці тому +1

    Would it be possible to get your benchmarking code as well?
    Anyways, thanks for this awesome content!

    • @aarondfrancis
      @aarondfrancis  3 місяці тому +2

      @@jannismilz yes I'll make a video!

  • @TomNook.
    @TomNook. 3 місяці тому +3

    BLAZINGLY

  • @davidguilherme5574
    @davidguilherme5574 3 місяці тому +2

    Is there a benchmark between a tuned sqlite vs postgres or mysql in the same machine?

  • @theSlavenIvanov
    @theSlavenIvanov 3 місяці тому

    Superb video quality as always!

  • @AbhinavKulshreshtha
    @AbhinavKulshreshtha 3 місяці тому +1

    Is the script on github? I was surprised to see a PHP script. Now I need to take a good look at the whole script.

  • @N3m3s7s83
    @N3m3s7s83 3 місяці тому +1

    Amazingly explained. But the question is ... Why wal mode is not the default mode? 😮

    • @daknyx1448
      @daknyx1448 3 місяці тому +2

      for backwards compatibility (the maintainers see it as highest priority)

  • @vlad981
    @vlad981 2 місяці тому

    Hi, nice video. Although 10x read seems like due to the some php driver optimization or testing methodology, as wal mode not supposed to incense reads, as specified in official site.
    In out app, where like 95-97% reads, we don’t notice any difference between 2 modes

  • @davidsiewert8649
    @davidsiewert8649 3 місяці тому +2

    You are going to some very strange parties.

  • @adampatterson
    @adampatterson 3 місяці тому

    I'd love to see something on Enums and modifying enums with SQLite.
    I wanted to test my app with SQLite but the migrations exploded and I didn't feel like modifying client work for the test 😬
    But maybe it's a good topic?

  • @rudiedirkx
    @rudiedirkx 3 місяці тому +1

    Can you benchmark journal_mode = off too? Is that even way very much faster?

  • @Michielofzo
    @Michielofzo 3 місяці тому +2

    Intro cracked me up

  • @boot-strapper
    @boot-strapper 19 днів тому

    Not sure exactly how it’s different, but using bunjs’s built in SQLite I’m able to write a million records in about 200ms. Seems much faster than what you’re showing, but I’m using SQLite programmatically

    • @aarondfrancis
      @aarondfrancis  19 днів тому +1

      Yeah this is not an absolute benchmark, just a comparative one. PHP isn't as fast as other languages.

    • @berkancetinkaya5329
      @berkancetinkaya5329 11 днів тому

      Write a million records in about 200ms? Could you please share your benchmark code along with SQLite configuration?

    • @boot-strapper
      @boot-strapper 11 днів тому

      @@berkancetinkaya5329 it’s not a benchmark. It’s a mock data generator app.

    • @boot-strapper
      @boot-strapper 11 днів тому

      @@berkancetinkaya5329 as for the config, it’s the default settings for bun and drizzle sqlite

  • @fredericoneto1984
    @fredericoneto1984 3 місяці тому +1

    wanna share that Bench.php ? would be usefull to tweak it to test more DB's

  • @tiagorodrigues_br
    @tiagorodrigues_br 2 місяці тому

    What an excellent video!!

  • @zacharyquinn3676
    @zacharyquinn3676 3 місяці тому +1

    What terminal is that?

  • @julianjackson8756
    @julianjackson8756 3 місяці тому

    Thanks for that

  • @nicobaier5424
    @nicobaier5424 2 місяці тому

    What is the `ar` command you're using to run the `bench` script?

    • @ylynfatt
      @ylynfatt Місяць тому +1

      It's just an alias/shortcut he setup to run the Laravel php artisan command.

    • @racingmars
      @racingmars 5 днів тому

      @@ylynfatt The fact that `ar` would ever be anything other than the Unix archive utility is... troubling.

  • @davidharting3119
    @davidharting3119 3 місяці тому

    Do you need to run the pragma to set WAL mode every time a process connects to SQLite? Or is it a durable config?

    • @ricky2629
      @ricky2629 3 місяці тому +1

      It's a one time thing, you only need to do it when you initially create the db

    • @davidharting3119
      @davidharting3119 3 місяці тому

      Awesome thanks!

  • @master74200
    @master74200 Місяць тому +1

    There are VERY good reasons not to use WAL mode and I am honestly disappointed that an outright recommendation for WAL mode was made here. WAL mode sounds better BUT it does not work if there are multiple applications on different computers all reading and writing the same database. In the classic rollback mode, this does work.

  • @kirayamato6128
    @kirayamato6128 3 місяці тому

    love you Aaron 💘😍

  • @luismex5575
    @luismex5575 3 місяці тому

    Why we stop seeing you fron planetscale videos ?

    • @aarondfrancis
      @aarondfrancis  3 місяці тому

      I got laid off

    • @luismex5575
      @luismex5575 2 місяці тому +1

      ​@aarondfrancis sorry to hear that, your videos of MySQL were the best , I think they made a mistake

    • @luismex5575
      @luismex5575 2 місяці тому

      ​@@aarondfrancis😢

    • @pjc825
      @pjc825 2 місяці тому

      @@aarondfrancis Wow, that's so sad, your videos were absolutely brilliant 😭

  • @gavinh7845
    @gavinh7845 3 місяці тому +1

    🚀🚀🚀

  • @australianman8566
    @australianman8566 3 місяці тому

    does anyone know wehere I can find the bench marking script?

  • @abhilashkr1175
    @abhilashkr1175 2 місяці тому

    You will have to consider purchasing power parity when pricing the courses in different countries

  • @rahmanramsi
    @rahmanramsi 3 місяці тому

    i need the code to try it myself

  • @Pbertrand_dev
    @Pbertrand_dev 3 місяці тому +9

    WAL mode should be a paid feature, im suprised its included in the lite plan

    • @patelmalavdev
      @patelmalavdev 3 місяці тому

      Wal mode is reason why sqlite took resurgence and sqlite is public domain code.
      The team behind get paid other ways providing exclusive services and support

    • @SAsquirtle
      @SAsquirtle 3 місяці тому +1

      @@patelmalavdev I think it's a joke about the lite in sqlite

    • @patelmalavdev
      @patelmalavdev 3 місяці тому

      @@SAsquirtle ah
      Though I always thought SQLite was a open source project but
      It's just a company making it and giving away for free

  • @the-avid-engineer
    @the-avid-engineer 3 місяці тому +1

    *nods head first 20 seconds*

  • @njordhoder
    @njordhoder 3 місяці тому

    Haha the intro 😂

  • @kevinbatdorf
    @kevinbatdorf 3 місяці тому

    When not to use WAL mode?

    • @OldKing11100
      @OldKing11100 3 місяці тому

      Server is subject to random poweroff creating corruption.

    • @aarondfrancis
      @aarondfrancis  2 місяці тому

      WAL mode is safe through power loss! I can't think of a single reason to not use WAL anymore

    • @OldKing11100
      @OldKing11100 2 місяці тому

      @@aarondfrancis Nice. I thought there was still a chance of the WAL file getting corrupted during write, but it probably just does a discard on the bad write when reconnecting the DB.

  • @tanko.reactions176
    @tanko.reactions176 23 дні тому

    DOOD

  • @PainHardcore
    @PainHardcore 3 місяці тому

    php? Seriously?