Live data from Hacker News

PlanetScale is now generally available

planetscale.com

51–60 of 139 posts

Re: PlanetScale is now generally available

#51
post #41
post #29

Earlier quoted context omitted.

There is not and will never be a solution to the problem of horizontally scaling an application and database designed jointly for a single-box ACID RDBMS. You have to compromise something to get the scaling.

What is the compromise of Cockroach DB?

I believe they use some statistical analysis and declared locality tags (from config) to group related cells of data on the same nodes and regions, but I don't know how effective that proves. Pure performance isn't a strong suit of CRDB as far as I can tell, but sometimes that works fine, and it does scale well horizontally.

Re: PlanetScale is now generally available

#52

Warning: One misconfiguration of your database and you will get hammered by billing. One guy forgot to put foreign keys and got a $20,000 bill.

Indexes, rather. They charge by rows read, so if you don't add indexes you will (very quickly) read all the rows in your table on every query. That racks your bill really fast.

The foreign key thing is because the author thought foreign keys add indexes, but here foreign keys are no-ops and don't do anything. Because it's so distributed there's no support for foreign keys.

Re: PlanetScale is now generally available

#54
I still don't understand how you can work safely with this kind of pricing model. You pay $1.50 per 10 million rows inspected by the database.

A relational database like MySQL has a query planner, so you're not fully in control over how exactly the database accesses your data. How many rows are read not only depends on your specific SQL query but also on the contents of the tables you read and the parameters supplied along with the query.

A statistics update that triggers a bad query plan on a table with 10 million rows could cause a full table scan instead of retrieving a few rows using an index scan. Suddenly your query is a million times more expensive at $1.50 per query. Depending on how quickly and widely this scales, that could get very expensive very fast.

10 million rows is also not a lot for a relational database. I know my comparison now isn't fair as you get a lot more with the hosted version, but a quick and dirty experiment with Postgres and a small table of two ints and a text column with 10 million rows took ~1.5 seconds to query on my desktop, using only 1 CPU core. Translated into this pricing model that's something like $60 per minute.

Re: PlanetScale is now generally available

#55

I am having trouble understanding what a "Serveless Database" is. When I do a search of the term, I get hype, not a definition. For example: "What is Serverless Database? Serverless Database is a prerequisite for Serverless Computing. These are specially designed for the workloads which are unpredictable and can change rapidly. What’s more? This allows you to pay only for the database resources you use, on a second-b…

Probably it can be defined to be "database as a service".

Re: PlanetScale is now generally available

#56
post #2

If you don't know what PlanetScale is, it is a serverless database offering. It is compatible with MySQL and offers lots of tooling on top of it. More here: https://docs.planetscale.com/ When I looked at it a few months ago, it had some limitations (lack of referential integrity, MySQL version compatibility) but I'm not sure if they've been addressed (or, in some cases, if they are possible to address). Anyway, alway…

Thanks for this. The site does a poor job of explaining what they actually do

Re: PlanetScale is now generally available

#57

I still don't understand how you can work safely with this kind of pricing model. You pay $1.50 per 10 million rows inspected by the database. A relational database like MySQL has a query planner, so you're not fully in control over how exactly the database accesses your data. How many rows are read not only depends on your specific SQL query but also on the contents of the tables you read and the parameters supplied…

See also https://briananglin.me/posts/spending-5k-to-learn-how-databa...

Re: PlanetScale is now generally available

#58
post #26

Earlier quoted context omitted.

You don't provision and manage the infrastructure associated with your DB. Someone else does it for you and you just focus on querying/storing the data and whatever else your business requires you to do.

Not provisioning & managing is part of it, but the pricing model is important too. e.g. RDS and Mongo Atlas are managed database services so you're not provisioning and managing the infra, but you are paying for dedicated machines and their sizes, etc.

Atlas offers serverless today

Re: PlanetScale is now generally available

#59

I still don't understand how you can work safely with this kind of pricing model. You pay $1.50 per 10 million rows inspected by the database. A relational database like MySQL has a query planner, so you're not fully in control over how exactly the database accesses your data. How many rows are read not only depends on your specific SQL query but also on the contents of the tables you read and the parameters supplied…

Does MySQL (or PlanetScale) provide a way to input a query and get a lower/upper bound on the number of rows the query will "inspect" when run?

Re: PlanetScale is now generally available

#60

I still don't understand how you can work safely with this kind of pricing model. You pay $1.50 per 10 million rows inspected by the database. A relational database like MySQL has a query planner, so you're not fully in control over how exactly the database accesses your data. How many rows are read not only depends on your specific SQL query but also on the contents of the tables you read and the parameters supplied…

[deleted]
Post reply on HN