Queries

How can I perform a full table scan without the row limit per query?

Vitess supports different modes. In OLTP mode, the result size is typically limited to a preset number (10,000 rows by default). This limit can be adjusted based on your needs. However, OLAP mode has no limit to the number of rows returned. In order to ...more

Can I choose between primary and replica for query routing?

You can qualify the keyspace name with the desired tablet type using the @ suffix. This can be specified as part of the connection as the database name, or can be changed on the fly through the USE command. For example, ks@primary will select ks as the ...more

Can I address a specific shard if I want to?

If necessary, you can access a specific shard by connecting to it using the shard-specific database name, or issuing a USE statement to switch to it if already connected to vtgate. For a keyspace ks and shard -80, you would use the database name ks:-80. ...more

Can I set a session variable query timeout?

If you would like something similar to [max_execution_time](https://dev.mysql.com/blog-archive/server-side-select-statement-timeouts/) you can set the vttablet command line flag as follows: -queryserver-config-query-timeout=15. This is set in seconds. You ...more

Can I increase the resource pool timeout for streaming requests?

Yes. You can adjust the vttablet flag for this. For example: --queryserver-config-stream-pool-timeout=1s. ...more