logoalt Hacker News

vagab0ndtoday at 12:24 AM7 repliesview on HN

I recently started digging into databases for the first time since college, and from a novice's perspective, postgres is absolutely magical. You can throw in 10M+ rows across twenty columns, spread over five tables, add some indices, and get sub-100ms queries for virtually anything you want. If something doesn't work, you just ask it for an analysis and immediately know what index to add or how to fix your query. It blows my mind. Modern databases are miracles.


Replies

terafloptoday at 12:55 AM

I don't mean this as a knock on you, but your comment is a bit funny to me because it has very little to do with "modern" databases.

What you're describing would probably have been equally possible with Postgres from 20 years ago, running on an average desktop PC from 20 years ago. (Or maybe even with SQLite from 20 years ago, for that matter.)

Don't get me wrong, Postgres has gotten a lot better since 2006. But most of the improvements have been in terms of more advanced query functionality, or optimizations for those advanced queries, or administration/operational features (e.g. replication, backups, security).

show 5 replies
chasiltoday at 3:15 AM

I am a DBA for Oracle databases, and XE can be used for free. It has the reference SQL/PSM implementation in PL/SQL. I know how to set up a physical standby, and otherwise I know how to run it.

That being said, Oracle Database SE2 is $17,500 per core pair on x86, and Enterprise is $47,500 per core pair. XE has hard limits on size and limits on active CPUs. XE also does not get patches; if there is a critical vulnerability, it might be years before an upgrade is released.

Nobody would deploy Oracle Database for new systems. You only use this for sunk costs.

Postgres itself has a manual that is 1,500 pages. There is a LOT to learn to run it well, comparable to Oracle.

For simple things, SQLite is fine. I use it as my secrecy manager.

Postgres requires a lot of reading to do the fancy things.

show 1 reply
on_the_traintoday at 6:21 AM

My perspective might be equally naive as I've rarely had contact with databases in my professional life, but 100ms sounds like an absolutely mental timeframe (in a bad way)

crazygringotoday at 1:00 AM

Everything you describe, relational databases have been doing for decades. It's not unique to Postgres.

NamlchakKhandrotoday at 2:53 AM

what are you comparing this to btw?

tovliertoday at 1:07 AM

"sub-100ms queries" is not a high bar to clear. Milliseconds isn't even the right measurement.

show 1 reply