Database Speed Showdown: SQL, NoSQL vs. PostgreSQL Performance Comparison

Ғылым және технология

Let's compare the speeds of these three very different database types using unsubstantiated pseudo-science! The results were actually not what I was expecting, still I refuse to write something like *SHOCKING RESULTS* in the title :D Hope you enjoy the comparison!
⭐ Our startup: wordful.ai
⭐ My GitHub: github.com/joschan21
The stuff I use to make my videos
Camera: amzn.to/3XcqRKO
Light: amzn.to/3Xc1yIE
Keyboard: amzn.to/3CKxnAi
Mouse: amzn.to/3CNcfcm
Microphone: amzn.to/3iybVHC
Headphones: amzn.to/3IHTTgH
thats pretty much it. Those are affiliate links so I might earn a commission if you purchase after clicking them. :^)

Пікірлер: 42

  • @DaveMacpherson
    @DaveMacpherson Жыл бұрын

    Not sure why you refer to the MySQL database as a "SQL" database, and the Postgres database as something different, when in fact both MySQL and Postgres are both SQL databases.

  • @princebhanwra11
    @princebhanwra11 Жыл бұрын

    Comparison is not fair. All databases should be on installed on same hardware, and possibly on local machine or on intranet

  • @lmtr0

    @lmtr0

    3 ай бұрын

    Very true

  • @Mr.BinarySniper

    @Mr.BinarySniper

    Ай бұрын

    Year true.

  • @aqua47_9

    @aqua47_9

    Ай бұрын

    Day true

  • @afcz4300
    @afcz4300 Жыл бұрын

    Dude, this is not how you perform a comparison between databases. Run this in local, also do over a large dataset and remember, DON'T USE NEXT OR PRISMA FOR THIS I know this requires effort, but I know you can do better

  • @joshtriedcoding

    @joshtriedcoding

    Жыл бұрын

    "Let's compare the speeds of these three very different database types using unsubstantiated pseudo-science!" hehe

  • @well.8395

    @well.8395

    Жыл бұрын

    @@joshtriedcoding What do you mean unsubstantiated pseudo-science? Your benchmarks don't even make any sense.

  • @fractal-tess
    @fractal-tess10 ай бұрын

    Bad benchmark: 1: prisma has a lot of overhead - bindings, graphql, rust engine parsing/joining and so on.... 2: should benchmark databases on local machine where network latency is not a factor. 3: should have some kind of data inside ( you would be surprised how much different the results will be then)

  • @rumplstiltztinkerstein
    @rumplstiltztinkerstein Жыл бұрын

    Each of the databases will be in different physical locations. So maybe it would better to ping the urls to see how long it takes for each response to return. Also, I think it would be better to see how long it would take to process a large batch of request instead of just one.

  • @daheck81

    @daheck81

    Жыл бұрын

    Yea, this isn't a db performance but rather a hosting performance (even if they're all in the same region)

  • @denissorn

    @denissorn

    Жыл бұрын

    Or maybe it would be better to run it locally, use larger data sample. Do tests with similarly structured data, then with what would be typical for particular use case and the database type.

  • @joshtriedcoding

    @joshtriedcoding

    Жыл бұрын

    Yeah interesting point with the batch request

  • @sguploads9601

    @sguploads9601

    Жыл бұрын

    you are wong - second - third writes just in 15 ms - it should be sever next to him

  • @RJ-sw7zv

    @RJ-sw7zv

    7 ай бұрын

    He didn’t even get to cold starts and connection pooling this is click bait from a “developer” that knows nothing…

  • @janisbasisbasovsdev7147
    @janisbasisbasovsdev7147 Жыл бұрын

    When does noSQL shines? - Its when u have thousends on entities in the DB and you need to get only one specific. in noSQL the entity is saved in a hashed value, thtas a value which is known by the database immediatelly. However in SQL databses you need to iterate throught the whole or some part of the database till you find the entity you r searching for. Thats why SQL request time grows with your databse size, but in noSQL the request time will not be affected by the size of the database it self. :)

  • @HelmutIsaacPadillaChavarria

    @HelmutIsaacPadillaChavarria

    Жыл бұрын

    One can use hash indexes to have the same functionality, in general I will say that if you have a well-structured data, use PostgreSQL, in general PostgreSQL is between two and five times faster specially in a well-tuned DB. However, if you don't have well defined models/schemas, it is better to use Mongo or another document-based DB, otherwise you will have a lot of Null fields/columns. If you know that you will store a lot of data, I think it will be simpler to maintain performance with Mongo, otherwise I think you will need to use something like Citus. If you have a lot of transactions and complex models use PostgreSQL. I am curious about what is better if someone uses only an ORM like prisma?

  • @Miles-co5xm

    @Miles-co5xm

    Жыл бұрын

    Indexing

  • @daniellombardi3670
    @daniellombardi3670 Жыл бұрын

    the fact that this video exists makes me scared. You cant compare databases like that, there must be a substancial amount of reads/writes for any true comparison to be made. All dbs must be running on same hardware and at least in the same network as to mitigate connection delays. By doing such small amounts you even get affected by the OS scheduler dude, wtf

  • @yangdongjun
    @yangdongjun Жыл бұрын

    I could not trust the PRISMA for the comparison. Better to use the mysql2, pg, mongoose.

  • @well.8395

    @well.8395

    Жыл бұрын

    why use mongoose, when you can use native mongodb driver? Mongoose is 3-5x slower thna the native driver.

  • @yangdongjun

    @yangdongjun

    Жыл бұрын

    @@well.8395 oh i see thanks!

  • @mohamedhamada8330
    @mohamedhamada833010 ай бұрын

    Benchmarking require some really challenging amount of data not just one object, the few ms's is pointless and maybe caused by many reasons and we can't end up with a final decision which one is better.

  • @codeme8016

    @codeme8016

    7 ай бұрын

    Exactly!

  • @jordanh9210
    @jordanh92104 ай бұрын

    The slow initial speeds are likely due to opening a connection and authenticating it, also you should really have the db's locally installed so you can rule out network delays and you should also try small requests as well as large and filtered requests. Using mongodb I got down to 15ms average (after code optimizations like not closing the session) from the cloud and 5ms for small requests if memory serves, this is an old vid but i hope you do another larger one in the future.

  • @lyrixs4u
    @lyrixs4u2 ай бұрын

    Please give the guy a break, he was just trying a simple experiment, it's clearly not a full-scale database benchmarking or comparative analysis. I bet he's not a database expert or maybe a data scientist. So, why expect so much from him about the accuracy of his tests. Like he said, "Let's compare the speeds of these three very different database types using unsubstantiated pseudoscience" Unsubstantiated: Not supported or proven by evidence. Pseudoscience: Consists of statements, beliefs, or practices that claim to be both scientific and factual but are incompatible with the scientific method. Any help, even how small it is must be appreciated, not quantified. Thank you very much Josh!

  • @anonymous_anonymity
    @anonymous_anonymity Жыл бұрын

    "I expected Mongo DB to be on top due to the NoSQL infrastructure" -- 🤣🤣🤣.. developers oh my fellow developers 🤣🤣

  • @botobeni
    @botobeni2 ай бұрын

    bro you compared clouds not databases

  • @vaibhavpathak6721
    @vaibhavpathak672110 ай бұрын

    Ok, first of all I'll just clear out something very important, performance test with an ORM like PRISMA is probably the worst decision. Second of all you can't just compare these things like just making few simple insertions. SQL databases are very good for strong consistency and MongoDB has is too but it's not that fast. Same with the relations, relations are not as fast as RDMS. If you are building with MongoDB it is very important to shift your thinking from RDMS to NoSQL and very specifically to Document stores like MongoDB. MongoDB is amazing for large scales applications and SQL is also very good for these kind of apps but most important thing which I always consider is: Speed ACID (how good it is) Dataset size (after ingestion) Scale (MongoDB shines here but it's not like you can't scale RDMS)

  • @EdJanuskis
    @EdJanuskis6 ай бұрын

    I assume that test was not done on the same hardware. Also, you have to consider that data set is very small as well. I real world data sets are a lot bigger. But this test is almost true. Mongo dB is not consistent at all in comparison with Oracle (DB king) or any other dB. That is explained in dB architecture. Mongo dB gets worse when you start charting dB and have multi cluster environment with billion records in it also keep in mind that Mongo dB is very bad at creating indexes it simply will not perform due to the fact that all indexes must be cashed in RAM. this is not the case with any other SQL DB. Conclusion Mongo dB can not be applied just because it is easier for developers. It has very specific use.

  • @mahaddev
    @mahaddev2 ай бұрын

    You are comparing cloud servers not databases

  • @pietraderdetective8953
    @pietraderdetective89538 ай бұрын

    It's a common misconception / myth that NoSQL is faster than SQL...and I can see you got a lot of heat coz of this 😂 Anyway great content and highly entertaining video. Can you please do similar thing between Redis vs memcached?

  • @rj7855
    @rj78556 ай бұрын

    "Benchmarking" databases with only a couple of records in a database, most useless excercise I've seen in in a long time 😂

  • @TheShorterboy
    @TheShorterboy9 ай бұрын

    Stuff is getting cached in memory dude do a few hundred million transactions and try again, not sure why people think NoSql is some faster thing it's just more javascript friendly thing they all have to do sorts indexes there is no free lunch.

  • @sachinrawat4539
    @sachinrawat453910 ай бұрын

    You are benchmarking using single threaded programming language, seriously

  • @jeremycoleman3282
    @jeremycoleman3282 Жыл бұрын

    noob

  • @TeamGalaxyGaze
    @TeamGalaxyGazeАй бұрын

    One of the worst performance comparisons ever... Nothing optimized for performance and you expect anything from this? Total bullshit.

Келесі