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

preview_player
Показать описание
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!

The stuff I use to make my videos
thats pretty much it. Those are affiliate links so I might earn a commission if you purchase after clicking them. :^)
Рекомендации по теме
Комментарии
Автор

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.

DaveMacpherson
Автор

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

afcz
Автор

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

princebhanwra
Автор

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)

fractal-tess
Автор

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.

rumplstiltztinkerstein
Автор

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

daniellombardi
Автор

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. :)

janisbasisbasovsdev
Автор

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.

mohamedhamada
Автор

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

yangdongjun
Автор

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.

jordanh
Автор

You are comparing cloud servers not databases

mahaddev
Автор

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.

EdJanuskis
Автор

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!

lyrixsu
Автор

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

anonymous_anonymity
Автор

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

rj
Автор

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?

pietraderdetective
Автор

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.

TheShorterboy
Автор

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)

vaibhavpathak
Автор

You are benchmarking using single threaded programming language, seriously

sachinrawat
Автор

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

TeamGalaxyGaze