Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/docs/content/docs.v6/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"orm",
"postgres",
"accelerate",
"optimize",
"guides",
"platform",
"ai"
Expand Down
9 changes: 0 additions & 9 deletions apps/docs/content/docs.v6/optimize/faq.mdx

This file was deleted.

103 changes: 0 additions & 103 deletions apps/docs/content/docs.v6/optimize/getting-started.mdx

This file was deleted.

33 changes: 0 additions & 33 deletions apps/docs/content/docs.v6/optimize/index.mdx

This file was deleted.

53 changes: 0 additions & 53 deletions apps/docs/content/docs.v6/optimize/known-limitations.mdx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/docs/content/docs.v6/optimize/meta.json

This file was deleted.

11 changes: 0 additions & 11 deletions apps/docs/content/docs.v6/optimize/performance-metrics.mdx

This file was deleted.

9 changes: 0 additions & 9 deletions apps/docs/content/docs.v6/optimize/prisma-ai.mdx

This file was deleted.

26 changes: 0 additions & 26 deletions apps/docs/content/docs.v6/optimize/recommendations.mdx

This file was deleted.

11 changes: 0 additions & 11 deletions apps/docs/content/docs.v6/optimize/recordings.mdx

This file was deleted.

31 changes: 6 additions & 25 deletions apps/docs/content/docs.v6/platform/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metaDescription: Learn about the Console to integrate the Prisma Data Platform p
The [Console](https://console.prisma.io/login) enables you to manage and configure your projects that use Prisma Data Platform (PDP) products, and helps you integrate them into your application:

- [Accelerate](/v6/accelerate): Speeds up your queries with a global database cache with scalable connection pooling.
- [Optimize](/v6/optimize): Provides you recommendations that can help you make your database queries faster.
- [Query Insights](/postgres/query-insights): Built-in query performance insights for Prisma Postgres, helping you identify and fix slow queries.
- [Prisma Postgres](/v6/postgres): A managed PostgreSQL database that is optimized for Prisma ORM.
Comment thread
aidankmcalister marked this conversation as resolved.
Outdated

## Concepts
Expand Down Expand Up @@ -44,7 +44,7 @@ In each workspace, you can:
- manage billing, i.e. select a [subscription plan](https://www.prisma.io/pricing?utm_source=docs&utm_medium=platform-docs), configure payment methods, or view the invoice history.
- view the usage of your enabled PDP products across all projects in that workspace.
- invite other users to collaborate in the workspace.
- access the [Optimize dashboard](https://console.prisma.io/optimize?utm_source=docs&utm_medium=optimize-docs) to measure query performance and receive AI-powered recommendations.
- access [Query Insights](/postgres/query-insights) to measure query performance and receive AI-powered recommendations (available with Prisma Postgres).

### Database Metrics

Expand All @@ -57,30 +57,11 @@ detailed reports on how your database is performing, with various metrics like:
- Total operations
- Cache utilization

#### Optimize
#### Query Insights

You can access Optimize within your [Prisma Data Platform account](https://console.prisma.io/optimize) workspace.

##### Accessing the Optimize dashboard

To access the Optimize dashboard in your desired workspace:

1. Click the **Optimize** tab on the left navigation.
2. Click the **Generate API key** button.

##### Generating an Optimize API key

To obtain the Optimize API key:

1. Navigate to the workspace where you want to use Optimize.
2. Ensure that Optimize is launched. If it isn't, click the **Generate API key** button.
3. In Optimize, click your profile name in the top right corner of the navbar.
4. Select **Settings**.
5. Click **Create API key**.
6. Enter a name for the API key in the **Name** field, then click **Create**.
7. Copy the API key and store it securely. This will be used in your project's [`.env` file](/v6/optimize/getting-started) via the `"OPTIMIZE_API_KEY"`. Finally, click the **"I've stored it securely"** button.

You now have your Optimize API key.
:::note
Prisma Optimize has evolved into [Query Insights](/postgres/query-insights), now built directly into Prisma Postgres with no separate setup required.
:::
Comment thread
AmanVarshney01 marked this conversation as resolved.
Outdated

### Project

Expand Down
44 changes: 2 additions & 42 deletions apps/docs/content/docs.v6/postgres/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -346,48 +346,8 @@ While you can increase these limits based on your subscription plan, it's _still

## Query optimization

Prisma Postgres allows query optimization via [Prisma Optimize](/v6/optimize) and provides performance recommendations to help improve your database queries during development. You can enable it with Prisma Postgres or [also use it with your own database](/v6/optimize/getting-started), but setup and integration steps differ.
Prisma Postgres includes [Query Insights](/postgres/query-insights), which provides performance recommendations to help identify and fix slow database queries. Query Insights is built in and requires no additional setup.

### Can you automatically implement optimizations?

Prisma Postgres's query optimization feature offers insights and recommendations on how to improve your database queries. It does not alter any existing queries or your Prisma schema.

### How long is a recording session retained?

There are no limits on the storage retention period. A query performance recording session will be stored until you explicitly delete it.

### Do recommendation limits reset monthly?

Yes, the recommendation usage resets at the beginning of each calendar month. For example, if you use `5` recommendations by the end of the month, your usage will reset to `0` at the start of the next month.

### Can I get charged for exceeding the recommendation limit on the starter plan?

Yes, if you’re on the starter plan, exceeding `5` recommendations in a billing cycle will result in a `$5` charge at the end of that cycle. For more information, visit [our pricing page](https://www.prisma.io/pricing#optimize).

### How are viewed Prisma AI recommendations tracked for billing? Are they counted based on generated or viewed recommendations?

They are counted based on viewed recommendations. Once you click on a recommendation from the recommendations table and view the recommendation's detail page, it counts as being seen.

### Can I enable query optimizations for Prisma Postgres in production?

No, query optimizations for Prisma Postgres is not meant to be enabled for production use. It is specifically designed for local development, providing valuable insights and optimizations during that phase. While it's technically possible to run it in a production environment, doing so could result in performance problems or unexpected behaviors, as this is not built to handle the complexity and scale of production workloads. For the best experience, we recommend testing query optimization solely in your development environment.

You can use the `enable` property in the client extension to run it [only in development environment](https://www.npmjs.com/package/@prisma/extension-optimize). By default, the `enable` property is set to `true`.

```ts title="script.ts" copy showLineNumbers
import { PrismaClient } from "@prisma/client";
import { withOptimize } from "@prisma/extension-optimize";

const prisma = new PrismaClient().$extends(
withOptimize({
apiKey: process.env.OPTIMIZE_API_KEY,
enable: process.env.ENVIRONMENT === "development",
}),
);
```

### Why do I see "[optimize] HTTP 409 Conflict: There is no active recording to write queries to" warning?

This warning may occur when Prisma Optimize receives queries but no recording session is active. Typically, this can happen if Prisma Optimize is unintentionally enabled in your production environment. Prisma Optimize is specifically designed for use in local development environments and should not be enabled in production. To avoid this warning, ensure that Prisma Optimize is configured to run only during development.

If you are seeing this warning in your development environment, ensure that you have started a recording session in the Prisma Optimize Dashboard.
Query Insights provides insights and recommendations on how to improve your database queries, including AI-generated prompts you can use to fix issues. It does not alter any existing queries or your Prisma schema.
Loading
Loading