Postgres just got even faster

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

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

  • @hnasr
    @hnasr  4 месяца назад +5

    Fundamentals of Database Engineering course databases.win

  • @liquidpebbles
    @liquidpebbles 4 месяца назад +36

    I love when Hussein learns something because then we all learn something.

  • @ashishrao3069
    @ashishrao3069 5 месяцев назад +32

    This is the reason why I continue being a member :)

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

      How to become one?

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

      why? I also got the video

    • @SanjayB-vy4gx
      @SanjayB-vy4gx 4 месяца назад

      @@weirdworld3734 we are getting this content after some time after released its members first content

  • @jfbaro2
    @jfbaro2 4 месяца назад +8

    PostgreSQL just keeps getting better, and it's set to become the top choice for any new application that needs a relational database.

  • @mohamedhabas7391
    @mohamedhabas7391 4 месяца назад +3

    Thank you, this episode answered opened questions i had.
    specially the mapping of database pages to filesystem blocks

  • @ArunRamakrishnan
    @ArunRamakrishnan 4 месяца назад +14

    This is mostly useful for HAMR and spinning disk configs. Most NVMEs have super large i/o queues and write to the FTL in their own schedule.

    • @btom1990
      @btom1990 4 месяца назад +8

      Syscalls always have an overhead that you pay per call. Even if the hardware is perfectly capable of doing lots of tiny reads, the syscall overhead will eat your lunch.

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

      But sequential I/O is also faster on SSDs, they’re just not as terrible as HDDs for small reads

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

    Arab gulf region brother, Good work, happy to see your content. keep it up

  • @sankalpmukim1052
    @sankalpmukim1052 4 месяца назад +3

    It makes so much sense that I'm curious why aren't other databases also doing this?

    • @uFlock
      @uFlock 4 месяца назад +9

      They are, only postgress doesn't, until now.

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

    I dont think the term is overused. It's just what describes the concept the best. In this case, its used in very different parts of the system and it makes sense both places.

  • @Ed-wf9vk
    @Ed-wf9vk 4 месяца назад +1

    Good video.
    Nit: You might want to look into a light diffuser if you want to reduce the distracting glare in your glasses.

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

    Thank you so much, Hussein
    Please make a video about BRIN indexes (Block Range Index)
    Thanks, man

  • @pdevito
    @pdevito 4 месяца назад +3

    Fun watch! On a similar note, you should check out tiger beetle db. It’ll make a great video (or few!

  • @zephyrprime
    @zephyrprime 4 месяца назад +1

    I'm surprised it didn't do this already.

  • @fcanmekikoglu
    @fcanmekikoglu 5 месяцев назад +5

    Thank you, great content as always.

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

    Nice one, appreciate it. Thanks a lot. The question is if the planner chooses a sequential scan doesn't it mean that all pages need to be read?The only exception I see is LIMIT clause, otherwise all pages need to be read by sequential scan.

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

    Very interesting approach. Looks like there is also pwritev in linux kernel. I am wondering if any database take advantage of this for writing to the disk.

  • @alireza_aazadi
    @alireza_aazadi 4 месяца назад +1

    Hussein, I’ve followed you for around 3-4 years. Your content is amazing, but man! Ever since you decided to buy this mic, it’s become hard to listen to you. I don’t know why, but you don’t need to talk like you’re recording Backend Engineering ASMR! You used to be much, much more energetic with a clearer (and not so soft, low, and slow) voice! We’re not at a funeral, man, so don’t need t o be worry about speaking louder. Thanks for everything :)

  • @rheadrick2010
    @rheadrick2010 4 месяца назад +19

    Congratulations! Postrges finally discovered "multiblock reads". A thing which has been done in most enterprise scale databases since the 1990s.

    • @sankalpmukim1052
      @sankalpmukim1052 4 месяца назад +3

      Please give an example or something I can lookup to learn more about this

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

      ​@@sankalpmukim1052oracle multiblock read

    • @zephyrprime
      @zephyrprime 4 месяца назад +2

      Exactly. The only reason the performance was acceptable before was because both the OS and the drive itself were doing read ahead for the last few decades.

  • @mohammadtoficmohammad3594
    @mohammadtoficmohammad3594 4 месяца назад +1

    Thank you

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

    I am weighing a multimodal DB (ArcadeDB) with PostgreSQL & PgVector. Do you think this will this overtly effect this scenario? Either way I need to find a Redis replacement ;( (unless zip-stripping KVs out of PG is now a viable option) ;)

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

    thank you !
    I'm just trying to assume/imagine here.
    Also during high operations query (ORDERBY, GROUP BY, SORT) etc, only work_mem comes into picture right?
    Let's say my data is in shared_buffer and work_mem is not enough and lead to psql doing too many disk writes(*syscalls) which is worse than this shared_buffer part?

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

    What's your take on YugabyteDB??

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

    why do they name vectorized?

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

    well explained

  • @raidensama1511
    @raidensama1511 4 месяца назад +1

    Postgres encrypted data at rest would be great without having to get it through a third party.

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

      Isn't this the responsibility of the filesystem? Just put the db into an encrypted partition (e.g. LUKS)

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

      @@Thecommet no because one who hacks the system can read the decrypted files. Whereas one would additionally need the encryption key used by pg-3rd-party which is never stored or in an env-var locally.

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

    Make video about day in the life of software engineer

  • @skeletala
    @skeletala 4 месяца назад +2

    yet, their CLI is still so bad.

    • @kartik4792
      @kartik4792 4 месяца назад +2

      What features or improvements do you think could make it better?

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

      ​@@kartik4792 more colors and rainbows 🌈 🎨

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

      ​@@kartik4792 I just want it to be like MySQL in the ease of use. PG forces me to specify a DB in order to enter their prompt while there is no DB when you first install it, and it takes the user that you're loged in with instead of taking the one specified after the `-u` flag.
      I can't recall the version I've used, things could've got better.
      This is what Debian showed: 16+262.pgdg120+1
      but 17 is already here.

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

      @@kartik4792 ​ I just want it to be like MySQL in the ease of use. PG forces me to specify a DB in order to enter their prompt while there is no DB when you first install it, and it takes the user that you're logged in with instead of taking the one specified after the `-u` flag.
      I can't recall the version I've used, things could've got better.
      This is what Debian showed: 16+262.pgdg120+1
      but 17 is already here.

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

      I just want it to be like MySQL in the ease of use. PG forces me to specify a DB in order to enter their prompt while there is no DB when you first install it, and it takes the user that you're logged in with instead of taking the one specified after the `-u` flag.
      I can't recall the version I've used, things could've got better.
      This is what Debian showed: 16+262.pgdg120+1
      but 17 is already here.

  • @slavko321
    @slavko321 4 месяца назад +1

    As a mysql fan i always thought psql was slow and clunky. Color me surprised when they make it faster. Wow. Then again it's more about the features.

    • @michaellemon8287
      @michaellemon8287 4 месяца назад +3

      It's a misconception rooted in very old times. I work with both mysql and psql and I can honestly say that psql is much faster. With mysql I often come across performance issues, like dumb optimizer (not using indexes when it should), poor performance of views and complex queries, ineffective optimization of CTEs, etc. I had even cases where certain fast queries would have been impossible in mysql but could be done in psq due to more index types suited for various scenarios. Unless someone is using only very simple queries and structure, psql wins in performance hands down.

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

    I like read code , how about you ???😅

  • @Serpher1
    @Serpher1 4 месяца назад +1

    To shorten this video in one sentence: Postgresql will have Hyper Threading/Prefetching

  • @seydullanarkulyyev2729
    @seydullanarkulyyev2729 4 месяца назад +1

    Thanks!