Skip to content

Commit

Permalink
Clarify PARALLEL keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhghomon committed Oct 24, 2024
1 parent c9fd800 commit e5aa453
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/content/doc-surrealql/statements/create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ CREATE |person:500000| SET age = 46, username = "john-smith" TIMEOUT 500ms;

### Parallel

The `PARALLEL` keyword can be used to specify that the statement should be executed in parallel. Similar to the `TIMEOUT` clause this is useful for more control over how your queries should behave, if that is needed.
The `PARALLEL` keyword can be used to specify that the statement should be processed concurrently, rather than sequentially. Similar to the `TIMEOUT` clause this is useful for more control over how your queries should behave, if that is needed.

```surql
CREATE person:26, CREATE person:27 PARALLEL;
Expand Down
2 changes: 1 addition & 1 deletion src/content/doc-surrealql/statements/relate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ SELECT * FROM person WHERE ->knows->person->(knows WHERE influencer = true) TIME

## Using `PARALLEL` clause

When processing a large result set with many interconnected records, it is possible to use the `PARALLEL` keyword to signify that edges and remote records should be fetched and processed in parallel. This can be useful when you want to process a large result set in a short amount of time.
When processing a large result set with many interconnected records, it is possible to use the `PARALLEL` keyword to signify that edges and remote records should be fetched and processed concurrently, rather than sequentially. This can be useful when you want to process a large result set in a short amount of time.

```surql
-- Fetch and process the person, purchased and product targets in parallel
Expand Down
2 changes: 1 addition & 1 deletion src/content/doc-surrealql/statements/select.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ SELECT * FROM person WHERE ->knows->person->(knows WHERE influencer = true) TIME

## The `PARALLEL` clause

When processing a large result set with many interconnected records, it is possible to use the `PARALLEL` keyword to specify that the statement should be processed in parallel. This can significantly improve the performance of the statement, but it is important to note that the statement will not be processed in a transactional manner, and so the results may not be consistent.
When processing a large result set with many interconnected records, it is possible to use the `PARALLEL` keyword to specify that the statement should be processed concurrently, rather than sequentially.

```surql
-- Fetch and process the person, purchased and product targets in parallel
Expand Down

0 comments on commit e5aa453

Please sign in to comment.