Understanding the pricing
Hello!
I'm really thinking to bring my production env from sanity.io to you guys. I love sanity, is very good, but the lack of strong type safety and the fact I loved convex, I wanna migrate.
But, I didn't understand the princing...
Like, function call is each query? and bandwidth will be the size of the query documents?
8 Replies
@gwilliamnn So far this sounds right, each time a query runs or updates that counts as a function call, plus each time you run a mutation or an action.
Database bandwidth is the size of the data retrieved via calls like
db.query()
— this may be smaller (if you add hardcoded data) or larger (if you filter out some rows or fields in JavaScript) than the data returned to the client.Ok, good. Off topic now, what is the type for date on schema? I saw you guys use on crationtime unix, so will be number?
or a string for stringdate
?
You can't store a
Date
object in the database or use it in a Convex function argument or return value directly so you get to decide whether to use a number or a string.
The automatically added _creationTime
property is a whole-number JavaScript number (a float64) like Date.now()
. I think this is a nice approach.ok, float is good, the problem with this is if I need to see the table, without any js function, is hard to know the real time to that date
That’s true and a known issue. You can use strings instead to make the dashboard more readable.
For completness, when Tom says
_creationTime
is "whole number" like Date.now()
, it's worth mentioning it is floating point with fractional seconds. Unless something has changedGOTCHA
Oh thanks Ian, TIL! I though was whole number milliseconds like Date.now(), but it's fractional milliseconds.