-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use spanner-cli specific request tags for queries like SELECT 1
#129
Comments
One idea is to use |
like the following.
|
@takabow Looks good! Thanks for raising this. One thing I want to discuss is whether we should use different tags for different use cases. If we use the same tag like Do we think it's better to use different tags for each use case? |
The request tag is effectively used as the key of the query stats entry, not part of the compound key.
I think this behavior is confusing and it is better to use different
I think it is not hard to use |
Ah I didn't know that the multiple requests with the same tag are grouped into the single row of query statistics regardless of the actual queries. Then using the same tag doesn't make sense from semantics perspective. |
As apstndb suggested, I would like to implement this with individual tags. |
Sounds good to me! |
spanner-cli itself may issue SQLs in addition to SQLs directly issued by users.
For example,
SELECT 1
issued for heartbeat purposes, etc.Such queries appear in Cloud Spanner's query statistics and may confuse users who are unaware that spanner-cli is issuing them.
To identify such queries more easily, I suggest adding spanner-cli specific request tags to the queries.
As far as I can find, spanner-cli seems to issue its own SELECT query for the following uses.
SELECT 1
- At the beginning of a Read-write transactionSELECT 1
- To check if DB exists.SELECT 1
- HeartbeatSELECT ... FROM INFORMATION_SCHEMA.TABLES ...
- SHOW TABLESSELECT ... FROM INFORMATION_SCHEMA.INDEXES ...
- SHOW INDEXSELECT ... FROM INFORMATION_SCHEMA.COLUMNS ...
- SHOW COLUMNSI am not sure what specific string of text to tag, so I need your opinion.
As an example, it seems that Cloud Console uses
sys_cloud_console_*
to issue some queries.The text was updated successfully, but these errors were encountered: