Database calls: single vs multiple (cost and performance)

What do you mean by cost? Do you mean the actual cost, ie hardware/rental costs? Or are you talking about cpu/memory resource cost?

Actually, my answer is the same either way - I’ve not actually profiled any of it :slight_smile: The multi-value technique (the second one I mention) is my most common method and it doesn’t worry my setup at all.

I tend to throw hardware at databases until the cpu usage is under 40%. Traditionally I run galera clusters (http://galeracluster.com/) but I am trialling a CockroachDB cluster (https://www.cockroachlabs.com/) which looks interesting, especially from a horizontal scaling perspective.

My Galera clusters are $80/node (6 core, 16gig ram). They are VMs so cpu is not guaranteed but I never have any issues with them. Typically each cluster does about 15 million inserts per month, though it does fluctuate.

1 Like