You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/250-postgres/100-introduction/250-overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Prisma Postgres charges for:
22
22
- number of operations
23
23
- storage (in GiB)
24
24
25
-
An _operation_ is counted each time you perform a create, read, update, or delete, regardless of how simple or complex the underlying SQL is. Whether it's a single-row lookup or complex JOIN query, it still counts as one operation and costs the same. Read our blog post on [operationsbased billing](https://www.prisma.io/blog/operations-based-billing?utm_source=docs) for more details.
25
+
An _operation_ is counted each time you perform a create, read, update, or delete, regardless of how simple or complex the underlying SQL is. Whether it's a single-row lookup or complex JOIN query, it still counts as one operation and costs the same. Read our blog post on [operations-based billing](https://www.prisma.io/blog/operations-based-billing?utm_source=docs) for more details.
26
26
27
27
By treating every operation equally, you don't have to worry about write-heavy workloads driving up your bill or high-bandwidth requests ballooning costs unexpectedly. You can [directly correlate your database costs to real product usage and user behavior](/postgres/more/faq#is-there-a-sample-workload-to-estimate-my-expected-charges), making forecasting and budgeting simple and predictable.
Copy file name to clipboardExpand all lines: content/250-postgres/1200-more/1000-faq.mdx
+27-13Lines changed: 27 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,14 @@ Yes, you can use Prisma Postgres with any database library or tool via a [direct
20
20
21
21
If you previously signed up using GitHub and want to switch to email and password login, follow these steps:
22
22
23
-
#### 1. Verify Your GitHub Email Address
24
-
- Check the primary email address associated with your GitHub account (e.g., from your GitHub profile or notification settings).
25
-
26
-
#### 2. Create a New Email/Password Account
27
-
- Go to the email/password sign-up page.
28
-
- Use the **same email address** linked to your GitHub account to create the new account.
29
-
- Our system will automatically connect your new email/password account to your existing data.
30
-
31
-
#### 3. Test Your Login
32
-
- Log out and try logging in with your email and the password you just created.
23
+
1. Verify Your GitHub Email Address
24
+
- Check the primary email address associated with your GitHub account (e.g., from your GitHub profile or notification settings).
25
+
2. Create a New Email/Password Account
26
+
- Go to the email/password sign-up page.
27
+
- Use the _same email address_ linked to your GitHub account to create the new account.
28
+
- Our system will automatically connect your new email/password account to your existing data.
29
+
3. Test Your Login
30
+
- Log out and try logging in with your email and the password you just created.
33
31
34
32
:::note
35
33
@@ -50,21 +48,37 @@ VS Code should now recognize the `$extends` method.
50
48
51
49
## Pricing
52
50
53
-
Prisma Postgres bills based on operations and storage consumed. Visit the [pricing page](https://www.prisma.io/pricing) for details and our [blog post explaining operations-based billing](https://www.prisma.io/blog/operations-based-billing) for a detailed explanation on what an operation is and how this pricing model works.
51
+
Prisma Postgres bills based on _operations_ and _storage_ consumed. Visit the [pricing page](https://www.prisma.io/pricing) for details and our [blog post explaining operations-based billing](https://www.prisma.io/blog/operations-based-billing) for a detailed explanation on what an operation is and how this pricing model works.
52
+
53
+
### What is an operation?
54
+
55
+
An operation is counted each time you interact with your database. Read, write, simple or complex. It all simply counts as one.
56
+
57
+
An operation can be:
58
+
- a Prisma ORM query (when using Prisma ORM)
59
+
- a SQL query (when using a [direct TCP connection](/postgres/database/direct-connections))
54
60
55
61
### Does query execution time affect pricing in Prisma Postgres?
56
62
57
-
No, cost for Prisma Postgres is based solely on the _number of operations_ (i.e. Prisma ORM queries), not the amount of compute required to execute them.
63
+
No, cost for Prisma Postgres is based solely on the _number of operations_, not the amount of compute required to execute them.
58
64
59
65
Whether a query takes 10ms or 10sec to execute, its pricing impact remains the same.
60
66
67
+
### How does pricing differ between using Prisma ORM and direct TCP connections?
68
+
69
+
The fundamental principle of operations-based pricing remains the same for Prisma ORM and [direct TCP connection](/postgres/database/direct-connections). However, depending on whether you use Prisma ORM or direct SQL to interact with your database, an operation is something different:
70
+
- when using Prisma ORM: a query sent with Prisma Client (e.g. `prisma.user.findMany()`)
71
+
- when using another tool: a SQL query sent via the direct connection (e.g. `SELECT * from "User"`)
72
+
73
+
Note that a single Prisma ORM query may translate into multiple SQL queries which may make using Prisma ORM more economical than direct SQL.
74
+
61
75
### Do read and write queries cost the same?
62
76
63
77
Yes, read and write queries are counted equally as _operations_ and are billed the same way.
64
78
65
79
### Does a `SELECT 1` query count as a billable operation?
66
80
67
-
Yes, if submitted via Prisma ORM, a query like `SELECT 1` counts as an operation and will be billed accordingly (even if no actual data is accessed in the query).
81
+
Yes, a query like `SELECT 1` counts as an operation and will be billed accordingly (even if no actual data is accessed in the query).
68
82
69
83
### How can I estimate the number of operations in Prisma ORM?
SSL mode is required when connecting to Prisma Postgres via direct TCP, so you need to append `sslmode=require` to your TCP connection string.
46
46
47
+
## Billing
48
+
49
+
When using direct TCP to connect to a Prisma Postgres instance, every SQL query is counted as a [billable operation](/postgres/introduction/overview#usage-based-pricing). Learn more on our [pricing page](https://www.prisma.io/pricing).
0 commit comments