Skip to content

Commit 2db00f9

Browse files
authored
docs: document how to set a statement timeout (#390)
1 parent 18ddbdd commit 2db00f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/faq.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,18 @@ You can solve this problem by either:
8787
PGAdapter supports `COPY table_name FROM STDIN [BINARY]` and `COPY table_name TO STDOUT [BINARY]`.
8888
These commands can be used to copy data between different Cloud Spanner databases, or between a
8989
Cloud Spanner database and a PostgreSQL database. See [copy support](copy.md) for more information.
90+
91+
## How can I set a statement timeout?
92+
You can set the statement timeout that a connection should use by executing a
93+
`set statement_timeout=<timeout>` statement. The timeout is specified in milliseconds.
94+
95+
Example:
96+
97+
```sql
98+
-- Use a 10 second (10,000 milliseconds) timeout.
99+
set statement_timeout=10000;
100+
select *
101+
from large_table
102+
order by my_col;
103+
```
104+

0 commit comments

Comments
 (0)