-
Notifications
You must be signed in to change notification settings - Fork 787
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add more sections to optmize docs
- Loading branch information
1 parent
49fd29e
commit 0408abe
Showing
9 changed files
with
136 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,8 @@ | |
"Nikolas", | ||
"Supavisor", | ||
"inshellisense", | ||
"janedoe" | ||
"janedoe", | ||
"unindexed" | ||
], | ||
"patterns": [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
--- | ||
title: 'What is Optimize' | ||
metaTitle: 'What is Optimize' | ||
metaDescription: 'Learn about Optimize, a tool that generates insights and recommendations that can be used to make your database queries faster.' | ||
metaDescription: 'Learn about Optimize, a tool that generates insights and recommendations to make your database queries faster.' | ||
tocDepth: 3 | ||
toc: true | ||
--- | ||
|
||
<TopBlock> | ||
[Optimize](https://www.prisma.io/data-platform/optimize) helps you generate insights about your queries and provides recommendations that can be used to make your database queries faster. | ||
|
||
Its main features are: | ||
[Optimize](https://www.prisma.io/data-platform/optimize) is a tool designed to generate insights, help you debug database queries, and provide recommendations to make your queries faster. | ||
|
||
- Generating insights about your database queries | ||
- Providing recommendations to improve your database queries | ||
Key features include: | ||
|
||
The goal of Optimize is to help developers of all skill-levels to be able to write performant database queries so that database load is reduced and apps are more responsive. | ||
</TopBlock> | ||
- Generating insights about your database queries | ||
- Identifying errors to help debug your database queries | ||
- Providing recommendations to improve query performance | ||
|
||
Optimize aims to help developers of all skill levels write efficient database queries, reducing database load and making applications more responsive. | ||
|
||
</TopBlock> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,49 @@ | ||
--- | ||
title: 'Recording' | ||
metaTitle: 'Optimize: Recording' | ||
metaDescription: "Learn about everything you need to know to use Optimize's recording." | ||
metaDescription: "Learn about using Optimize's recording feature." | ||
tocDepth: 3 | ||
toc: true | ||
--- | ||
|
||
<TopBlock> | ||
|
||
The Recordings feature is designed for developers to debug and isolate different sets of queries into distinct sessions, known as recordings. This allows for targeted performance analysis and optimization, ensuring that queries from different applications or testing rounds do not get mixed, leading to clearer insights and more effective debugging. | ||
The Recordings feature is designed to help developers debug and isolate different sets of queries into distinct sessions, known as recordings. This targeted approach enables precise performance analysis and optimization by preventing the mixing of queries from different applications or test rounds, leading to clearer insights and more effective debugging. | ||
|
||
</TopBlock> | ||
|
||
## Managing a recording session | ||
|
||
You can manually start and stop recording sessions via the [Optimize dashboard](https://optimize.prisma.io), by clicking the **Start recording** and **Stop recording** buttons present in the dashboard. | ||
You can manually start and stop recording sessions via the [Optimize dashboard](https://optimize.prisma.io) by clicking the **Start Recording** and **Stop Recording** buttons. | ||
|
||
:::warning | ||
|
||
A recording will automatically stop when 10k query limit is reached or if the prisma schema of the app is changed. | ||
A recording will automatically stop if the 10k query limit is reached or if the Prisma schema of the app is changed. | ||
|
||
::: | ||
|
||
A recording session can be deleted when no longer needed. | ||
|
||
## Identification of a recording session | ||
## Identifying a recording session | ||
|
||
You can rename and tag your recording session for easy identification and context. You can do this by clicking on the generated default name of the recording session, and then typing the desired name for your recording session. | ||
You can rename and tag your recording sessions for easy identification and context. Click on the generated default name of the recording session and type the desired name. | ||
|
||
## Data captured from a recording session | ||
## Data captured in a recording session | ||
|
||
Each recording session captures insights about queries executed in your app, they include: | ||
- All executed queries during a recording session. | ||
- **Raw Query**: the raw query that is generated and sent to the database by Prisma ORM. | ||
- **Count**: Number of times the query was executed. | ||
- Performance metrics | ||
- **`AVG`**: The average query latency. | ||
- **`p50`**: The 50th percentile of the query latency. | ||
- **`P99`**: The 99th percentile of the query latency. | ||
- **`MAX`**: The maximum query latency. | ||
- Errors encountered during query execution | ||
Each recording session captures insights about queries executed in your app, including: | ||
- All executed queries during the session. | ||
- **Raw Query**: The raw query generated and sent to the database by Prisma ORM. | ||
- **Count**: The number of times a query pattern was executed. | ||
- [Query performance metrics](/optimize/performance-metrics). | ||
- Errors encountered during query execution. | ||
|
||
Each recording can have a maximum of 10K queries, however, there are no limits on storage retention period. | ||
Each recording can have a maximum of 10k queries. There are no limits on the storage retention period. | ||
|
||
## Recommendations generated from a recording session | ||
## Recommendations from a recording session | ||
|
||
When a recording session ends, Optimize also recommendations such as: | ||
- [Queries on unindexed columns](/optimize/recommendations#queries-on-unindexed-columns) | ||
- [Excessive number of rows returned](/optimize/recommendations#excessive-number-of-rows-returned) | ||
- [Full table scans caused by LIKE operations](/optimize/recommendations#full-table-scans-caused-by-like-operations) | ||
When a recording session ends, Optimize generates recommendations such as: | ||
- [Excessive number of rows returned](/optimize/recommendations#excessive-number-of-rows-returned) | ||
- [Full table scans caused by LIKE operations](/optimize/recommendations#full-table-scans-caused-by-like-operations) | ||
- [Queries on unindexed columns](/optimize/recommendations#queries-on-unindexed-columns) | ||
|
||
Learn more about the recommendations generated by Optimize [here](/optimize/recommendations). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: 'Performance metrics' | ||
metaTitle: 'Optimize: Query performance metrics' | ||
metaDescription: "Learn about the query performance metrics provided by Optimize." | ||
tocDepth: 3 | ||
toc: true | ||
--- | ||
|
||
<TopBlock> | ||
|
||
An Optimize recording session provides you with the query latencies of the executed queries recorded during the session, including average duration, 50th percentile, 99th percentile, and maximal query execution time. | ||
|
||
</TopBlock> | ||
|
||
## Total query durations | ||
|
||
Prisma Optimize provides the total latency for a query pattern so that you can analyze and debug slow queries. | ||
|
||
### Average query duration (**`AVG`**) | ||
|
||
The average query duration helps you understand the general performance of your queries by providing the mean execution time. This metric is useful for identifying overall trends and spotting inefficiencies that affect the typical user experience. | ||
|
||
### 50th percentile (**`P50`**) | ||
|
||
The 50th percentile (median) query duration indicates the time it takes for half of the queries to complete. This metric is useful for understanding the typical performance experienced by users, as it is not skewed by outliers. | ||
|
||
### 99th percentile (**`P99`**) | ||
|
||
The 99th percentile query duration shows the execution time for the slowest 1% of queries. This metric is critical for identifying and addressing performance bottlenecks that affect a small but significant portion of users, ensuring that the worst-case scenarios are optimized. | ||
|
||
### Maximal query duration (**`MAX`**) | ||
|
||
The maximal query duration provides the execution time of the single slowest query. This metric is useful for pinpointing extreme cases and understanding the worst performance your system can exhibit, helping you to diagnose and fix potential outliers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: "FAQ" | ||
metaTitle: "Prisma Optimize: FAQ" | ||
metaDescription: "Frequently asked questions about Prisma Optimize." | ||
tocDepth: 3 | ||
toc: true | ||
--- | ||
|
||
## Does Optimize automatically implement optimizations? | ||
|
||
Prisma Optimize provides 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 in Optimize? | ||
|
||
There are no limits on the storage retention period. Optimize will store a recording session until you explicitly delete it. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: 'Known Limitations' | ||
metaTitle: 'Optimize: Known Limitations' | ||
metaDescription: 'Learn about known limitations of Optimize.' | ||
tocDepth: 3 | ||
toc: true | ||
--- | ||
|
||
Below are the known limitations when using Prisma Optimize. If you are aware of any limitations that are missing, please let us know on the `#help-and-questions` channel in our community [Discord](https://pris.ly/discord). | ||
|
||
## Query limit on a recording session | ||
|
||
Each [recording session](/optimize/recording) can contain a maximum of 10k queries. Once this limit is reached, the recording session will end. |