Skip to content

Commit

Permalink
docs: API type in Query History
Browse files Browse the repository at this point in the history
  • Loading branch information
igorlukanin committed Jan 11, 2024
1 parent acd6f78 commit 3a67673
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions docs/pages/product/workspace/query-history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ while <Btn>Top Queries</Btn> will show the most-frequently executed queries:

### Filtering

You can also use filters to find problematic queries; you can filter by query
duration, cache status, whether the query was accelerated, and by failing
queries:
You can use filters to find queries by various criteria:
- duration,
- cache status,
- whether the query was accelerated with pre-aggregations,
- whether the query yielded an error,
- API type.

<Screenshot
highlight="inset(36% 22% 58% 7% round 10px)"
Expand All @@ -78,20 +81,24 @@ queries:

## Inspecting API Queries

To see an expanded view of a query, click on <Btn>❯</Btn> next to any query:
In the table, all queries are shown in their collapsed view by default.
To see an expanded view of a query, click on the&nbsp;<Btn>❯</Btn> button
to the left of any query.

<Screenshot
highlight="inset(-1% 87% -1% 9% round 10px)"
src="https://ucarecdn.com/7ec40dc3-813d-4e3e-881b-dc01a6fdfb50/"
src="https://ucarecdn.com/fe755749-9eff-4b58-b7b0-c79de2510499/"
highlight="inset(35% 2% 0 17.5%)"
/>

This will show us how long the query took, whether the query was accelerated,
and even view the raw query by clicking <Btn>❮/❯</Btn>:

<Screenshot
highlight="inset(1% 2% 93% 68% round 10px)"
src="https://ucarecdn.com/e3c00115-49f9-48a6-8f2b-949c53523c9f/"
/>
Check the columns to see the details:
- **Query** shows a representation of a query, similar to the REST API
[query format][ref-query-format]. In case of the SQL API, if the query is
not coercible to a REST API query, raw SQL is shown "as is."
- **API** shows the API type that was used to run the query: REST API via
HTTP transport, REST API via WebSockets, GraphQL API, or SQL API.
- **Duration** shows how long the query took, and the **bolt** indicates
whether the query was accelerated with pre-aggregations, in-memory cache, etc.
- **Time** shows the time the query was run at.

To drill down on a specific query, click it to see more information.

Expand Down Expand Up @@ -198,3 +205,4 @@ while the query is in the query execution queue:
[ref-deployment-api-instance]: /product/deployment#api-instances
[ref-deployment-refresh-worker]: /product/deployment#refresh-worker
[ref-workspace-sqlrunner]: /product/workspace/sql-runner
[ref-query-format]: /product/apis-integrations/rest-api/query-format

0 comments on commit 3a67673

Please sign in to comment.