Live data from Hacker News

Spending $5k to learn how database indexes work

briananglin.me

111–120 of 209 posts

Re: Spending $5k to learn how database indexes work

#111

I've seen things you people wouldn't believe. Millions burnt on consultants and licensing Oracle. I watched C series startups throwing it all away in a move to NoSQL. All those Amazon RDS fees will be lost in time.

Like tears in the rain

That last metaphore was added by the actor himself...the director asked him to have some human showing in him, and now it's history.

Re: Spending $5k to learn how database indexes work

#112
post #6

0,15 $ per query... The world has gone insane.

It's not quite so crazy when you phrase it as $0.15 for reading a million items from the database .

20 of those queries give me a VPS at Hetzner for a month.

Or 1 query = 3 gb / snapshot storage for a month.

Re: Spending $5k to learn how database indexes work

#114

Earlier quoted context omitted.

Rent metal and run your own MySQL/Postgres/... One insert every 3 seconds. Could run that off a 10 year old laptop.

The time spent setting it up and managing it and then having to deal with backups/environment clones/access control/scaling limitations/etc. outweighs the savings for almost any company paying US wages. Especially since you'd need metal for everything and not just the db due to network latency.

I think you're over estimating how complicated that stuff is...

Re: Spending $5k to learn how database indexes work

#115
post #25

This is definitely a lesson in the importance of indexes in general. We are well aware of the potential pitfalls with our current pricing. I’m happy to say we are nearly done modeling different metering rates for the product which would mean significantly lower bills for our users and avoid issues like this. It’s core to our mission that our product’s pricing is accessible and friendly to small teams. Part of being i…

Thanks Sam! As mentioned in the post, the PlantScale team was quick to credit our account for the overages and help us figure out what was going on. I'm personally super bullish on PlanetScale! With any new product there will be tradeoffs and rough edges but the positives, like easy migrations and database branches have definitely outweighed any difficulties.

We are so glad to have you as customers and I can't wait to partner as you grow to mega scale.

Re: Spending $5k to learn how database indexes work

#116

This is definitely a lesson in the importance of indexes in general. We are well aware of the potential pitfalls with our current pricing. I’m happy to say we are nearly done modeling different metering rates for the product which would mean significantly lower bills for our users and avoid issues like this. It’s core to our mission that our product’s pricing is accessible and friendly to small teams. Part of being i…

Would it be possible for you to add a spending cap? The user should be able to tell your system "here's how much I want to spend max" and if they exceed that they start getting errors or reduced performance.

Yes absolutely. We have daily and monthly budgets on the roadmap to make sure nobody gets a surprise bill in the future. This and more tools to make sure you are running your database optimally.

Re: Spending $5k to learn how database indexes work

#117

Earlier quoted context omitted.

I was just comparing the pricing to OVH's cloud VPS's ( https://us.ovhcloud.com/ ) and, accounting for the currency conversion and OVH's huge amount of free unmetered bandwidth (vs 20TB for H), it actually looks like OVH is even cheaper. How can DO and Vultr even compete? Probably on the basis of their nicer dashboards and easier sign-up flow (especially OVH's)

Tried OVH once. Couldn't even finish the account setup. Was rather dissapointed because I wanted not to depend on just one provider. Might give them a chance again.

I rented a VPS from the French website (their native language), and it was confusing. I remember looping through the same 2 pages 10 times before actually finding the instance's access instructions.

Of course, you don't have to care about the console once you have SSH access to the server. It seems to be pretty good service for the money.

Re: Spending $5k to learn how database indexes work

#118
post #41

Earlier quoted context omitted.

I'm a Vitess maintainer and I feel the same way. I don't plan to use any of the Online DDL because you'll have to pry my foreign keys out of my cold, dead hands. I understand the reasoning and limitations, but like you, the trade-off isn't worth it to me.

I'm so curious, so you maintain Vitess but don't use it personally?

I do use it in production and have for years, just not the online schema changes. It's fantastic and FKs are supported in a single shard, which we use heavily.

Re: Spending $5k to learn how database indexes work

#119

Earlier quoted context omitted.

I'm a Vitess maintainer and I feel the same way. I don't plan to use any of the Online DDL because you'll have to pry my foreign keys out of my cold, dead hands. I understand the reasoning and limitations, but like you, the trade-off isn't worth it to me.

What are your thoughts on Citus and Cockroach where foreign keys are still supported when creating partitioned clusters? Is due to fundamental differences in postgres vs innodb?

Vitess still supports foreign keys (single shard), using MySQL, just not with the Online DDL functionality.

I think Cockroach tries to be a little too magical, which is great for starting up a cluster, but I think you can architect for much better performance with Vitess and owning your sharding model. I'm also very happy to use InnoDB, one of the most battle tested db engines to ever exist, while Cockroach is currently rewriting theirs from scratch. At the distributed level, I don't know of any massive scale adopters of Cockroach yet, though I'm not 100% looped in, so forgive me if I'm ignorant of them. On the other hand, Vitess has seen adopters like Slack, GitHub, Square, HubSpot, YouTube, with many more in various stages of adoption.

I feel like Citus might be trying to be too many things and so hasn't gotten the traction that Vitess has. Vitess has nailed OLTP at scale, while Citus is trying to also do OLAP and be a single source. That's the holy grail, but I'm not sure that any technology is close to handling both of those well yet.

Re: Spending $5k to learn how database indexes work

#120
post #17

Don’t use DB providers that charge for rows/data scanned. Use Amazon RDS or Google Cloud SQL or just install it yourself on a VM. Pay for CPU, memory, and storage instead.

Rent metal and run your own MySQL/Postgres/... One insert every 3 seconds. Could run that off a 10 year old laptop.

Sure, but we're addressing people who are so far on the other end of the spectrum they're using a "serverless" database where they pay for the number of rows scanned per query. I think a managed DB is a better middle-ground for their capability level while still delivering massive cost-savings.

Amazon RDS lowest-tier runs about $13/mo for 10GB storage, 2 vCPUs and 1GB memory with automated backups and push-button restoring. And that would have likely met all of their needs with capacity to spare.

Post reply on HN