3 ms·
With AWS you can create a replica with a few clicks. Latency is measured in milliseconds for the three-nines observed usage. I don’t think this is a huge chall
by tyre 4y ago
With AWS you can create a replica with a few clicks. Latency is measured in milliseconds for the three-nines observed usage.
I don’t think this is a huge challenge (anymore) for Postgres or whatever traditional database.
- augustl 4y agoA few milliseconds per query adds up if you're doing one query per item in a list with 100s or 1000s of elements :)
- robertlagrant 4y ago> A few milliseconds per query adds up if you're doing one query per item in a list with 100s or 1000s of elements :) If you're doing this, then you need to stop :)
- tyre 4y agoah okay. in that case add in a couple hours to refactor those N+1 queries and you’re all good
- bt1a 4y agowhen do you ever have to do one query per array of items? genuinely curious
- augustl 4y agoI suppose I think of this the other way around. When the query engine is inside your app, the query engine doesn't need to do loop-like things. So you can have a much simpler querying language and mix it with plain code, kind of similar to how you don't need a templating language in React (and in Clojure when you use hiccup to represent HTML) Additionally, this laziness means your business logic can dynamically choose which data to pull in based on results of queries, and you end up with running fewer queries as you'll never need to pull in extra data in one huge query in case business logic needs it.
- dimitar 4y agoThat is a read replica, datomic peers can do writes as well, which further expands the possible use cases.