Postgres Over Everything - Why You Should Probably Just use Postgres for your next Web App

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

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

  • @timwmillard
    @timwmillard Месяц назад +11

    I love PostgreSQL

  • @Jeff-co.
    @Jeff-co. Месяц назад +6

    It would be amazing if you did a fullstack project series with the Saturn Framework (which uses Giraffe) and Postgres for database. Maybe a simple web app, but feature things like Auth and CRUD operations!

    • @HAMYLABS
      @HAMYLABS  Месяц назад +2

      Thanks for the suggestion!
      I've got some more videos about Giraffe coming out soon but have gotten several asks for Saturn / Falco so may dive into those next.

    • @Jeff-co.
      @Jeff-co. Месяц назад +1

      @@HAMYLABS Sounds good. Definitely looking forward to seeing a deep dive into Saturn and covering real world topics!

  • @ronnyek4242
    @ronnyek4242 Месяц назад +3

    I love postgres, but it's not perfect. Start rolling out some method closer to in place major version upgrades, and better/easier to configure sharing / scalability features.
    Libraries exist to do all this, but as 3rd party. I'm afraid this will continue to be the problem with postgres. Integrating native features dips into the commercial extension vendors bottom line

  • @ransomecode
    @ransomecode Месяц назад +1

    What about SurrealDB?

  • @kartikmahajan4405
    @kartikmahajan4405 Месяц назад +1

    Thanks for sharing your experience, really useful. One question though - maybe too premature, what if my write workload becomes too high at somepoint in time for a single Postgres instance to take on. This question is not for a simple web app - is there an alternative to Amazon Aurora/GCP AlloyDB/ Neon / Yugabyte etc(which are Postgres compatible and claim to make it "scalable") What is the simplest thing you would suggest?
    Thanks again for your perspective.

    • @HAMYLABS
      @HAMYLABS  Месяц назад +3

      I think if you're asking "what if my write workload is too high" then your write workload is probably not too high so just use Postgres.
      For hypotheticals though - usually what you do is allow the write to be async using queues and/or shard your data so that the writes on a single node / cluster are not too high.
      If that's still not enough then hopefully your business is making enough money to hire a database engineer / expert who can take you to hyper scale.

  • @jordyvu999
    @jordyvu999 Месяц назад +1

    supabase is posgres behind the scene?

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

      Looks like it - supabase.com/
      Managed Postgres with extra features

  • @zyr4c31
    @zyr4c31 Месяц назад +13

    sqlite is my default choice because it just allows me to build more on the backend and if other sql dbs have an edge then i can easily move to those without having to rewrite all the sql

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 Месяц назад +4

      I prefer sqlite because you can create memory databases for tests and it is extremely fast
      Postgres has supabase as database in edge, it is not like D1 from cloudflare
      You are using a sqlite on the edge, can you give more details perhaps I will use it too?

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

      My DBA hates SQLite because she can't touch it or manage it. There is also something really nice about Go + SQLite where if you stuff you project under /opt/ you can simply tar it up and move it to a new server. You have to recreate the cron jobs and systemd service, but that's very easy. It's just super nice starting with SQLite.

    • @tansven8760
      @tansven8760 Месяц назад +1

      Turso feels pretty decent for a hosted SQLite solution

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

    There's a low frequency droning noise that's killing me

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

      Q: Is it throughout the whole video or just some spots? What kind of audio device are you using?
      I've gotten a few reports of this but haven't been able to reproduce it on my end. So curious if I'm just missing it or missing a setting or smth.
      Hopefully if I can find it I can make sure my future videos don't have it too.

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

    I'm not sure about your criticism of non primary key lookups. Mongo has had non primary key indexes forever.

    • @paca3107
      @paca3107 Месяц назад +1

      and its very slow. primary keys cause faster searching.

  • @mrlectus
    @mrlectus Месяц назад +1

    How would it replace redis?

    • @HAMYLABS
      @HAMYLABS  Месяц назад +3

      Postgres doesn't replace Redis. They are good at different things.
      So the argument is to use the best technology for the job. In most cases Postgres is the best technology for your core data model. From there if you need to scale you can use other technologies to server your auxiliary data models - like Redis for caching.

    • @jordyvu999
      @jordyvu999 Месяц назад +1

      @@HAMYLABSposgres support vector db and vector search?

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

    How about i use CASSANDRA

  • @airaction6423
    @airaction6423 Месяц назад +1

    Isn't postgres single threaded? This could be a big problem for high traffic apps with a large amount of concurrent queries

    • @jasonfreeman8022
      @jasonfreeman8022 Месяц назад +1

      5 seconds on ChatGPT:
      PostgreSQL is not single-threaded; it is designed to be multi-threaded or more precisely, multi-process.
      Each new client connection to a PostgreSQL server is handled by a separate process, also known as a backend process. These processes can run concurrently, leveraging multiple CPU cores, allowing for parallel execution of tasks across many users or sessions.
      However, some internal operations within PostgreSQL, such as the execution of SQL queries, are generally single-threaded per session or per connection. A single query from a single connection will typically run on a single CPU core. But PostgreSQL has introduced features like parallel query execution (available in version 9.6 and later) to distribute parts of the query across multiple processes, utilizing multiple CPU cores to improve performance for certain complex queries.
      In summary:
      • PostgreSQL itself is multi-process, allowing it to use multiple CPU cores for different client connections.
      • Each query is typically single-threaded but can be parallelized depending on the query and PostgreSQL configuration (e.g., parallel query execution).

    • @user-eg6nq7qt8c
      @user-eg6nq7qt8c Месяц назад

      it's multi-process and it supports parallel query execution. It can support whatever you throw at it. It's no toy

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

      @@user-eg6nq7qt8c one whole new process for each query? This is called toy where I live

  • @youtubegarbage4u
    @youtubegarbage4u Месяц назад +1

    can you explain how oracle will take one's data hostage because of using mysql? please explain how

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

      He cant😂 he is just throwing fear to push people to use his beloved postgres MySQL is free since 1995 and open source it will never be closed source oracle has its oracle database they dont need to kill MySQL it brings them business postgres my die one day because its not backed up by strong company like oracle backs up MySQL

  • @AntonioRonde
    @AntonioRonde Месяц назад +16

    The background noise makes this difficult to watch, sorry

    • @mr.random8447
      @mr.random8447 Месяц назад +7

      What background noise?

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

      maybe you can't hear it if you listen on your phone or something that can't reproduce low frequencies. Sounds like a ground loop

  • @jonathangamble
    @jonathangamble Месяц назад +1

    graph databases should be used more