-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: consider prohibiting CREATE STATISTICS without specifying AOST option #72719
Comments
We probably should keep some way of running |
We have marked this issue as stale because it has been inactive for |
Makes specifying an AS OF SYSTEM TIME option required when using the CREATE STATISTICS command. Using CREATE STATISTICS without an AOST option results in a regular scan which could contend with concurrent transactions. Fixes: cockroachdb#72719 Release note (sql change): using the CREATE STATISTICS command without the AS OF SYSTEM TIME option could contend with concurrent transactions and cost performance. The AS OF SYSTEM TIME option is now required to prevent such usage.
Using CREATE STATISTICS without an AOST option results in a regular scan which could contend with concurrent transactions. Implements a default AOST of -1us to the CREATE STATISTICS command to avoid this. Fixes: cockroachdb#72719 Release note (sql change): using the CREATE STATISTICS command without the AS OF SYSTEM TIME option could contend with concurrent transactions and cost performance. Running CREATE STATISTICS without specifying AS OF SYSTEM TIME now uses a default of -1us.
Using CREATE STATISTICS without an AOST option results in a regular scan which could contend with concurrent transactions. Implements a default AOST of -1us to the CREATE STATISTICS command to avoid this. Fixes: cockroachdb#72719 Release note (sql change): using the CREATE STATISTICS command without the AS OF SYSTEM TIME option could contend with concurrent transactions and cost performance. Running CREATE STATISTICS without specifying AS OF SYSTEM TIME now uses a default of -1us.
Using CREATE STATISTICS without an AOST option results in a regular scan which could contend with concurrent transactions. This commit adds a default AOST option of -1us to the CREATE STATISTICS command to avoid this. Fixes: cockroachdb#72719 Release note (sql change): using the CREATE STATISTICS command without the AS OF SYSTEM TIME option could contend with concurrent transactions and cost performance. Running CREATE STATISTICS without specifying AS OF SYSTEM TIME now uses a default of -1us.
124488: sql: add a default AOST option to CREATE STATISTICS r=Uzair5162 a=Uzair5162 Using CREATE STATISTICS without an AOST option results in a regular scan which could contend with concurrent transactions. This commit adds a default AOST option of -1us to the CREATE STATISTICS command to avoid this. Fixes: #72719 Release note (sql change): using the CREATE STATISTICS command without the AS OF SYSTEM TIME option could contend with concurrent transactions and cost performance. Running CREATE STATISTICS without specifying AS OF SYSTEM TIME now uses a default of -1us. Co-authored-by: Uzair Ahmad <[email protected]>
127583: sql: include MaxTimestampAge info for TableReader in DistSQL diagrams r=yuzefovich a=yuzefovich This commit includes `MaxTimestampAge` field of the `TableReaderSpec` into the DistSQL diagram. This feature is used by the table stats collection to utilize the inconsistent scan, and it'll be easier to confirm that it's actually used under the hood. Informs: #72719. Epic: None Release note: None 127672: logictest: retry relocate stmt in a couple of places r=yuzefovich a=yuzefovich The capabilities are propagated asynchronously, so previously we could try to relocate ranges in the secondary tenant before the necessary capability was picked up. This was recently changed in 5f2a4f8. Fixes: #127659. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
For
CREATE STATISTICS
statement we get a different internal behavior depending on whetherAS OF SYSTEM TIME
option is specified or not:We've seen multiple cases when users didn't know about this difference and shot themselves in the foot. I think that it might be a good idea to error out if AOST is not specified and give a hint to use AOST
-0.001s
(as we already do forANALYZE
).Jira issue: CRDB-11266
The text was updated successfully, but these errors were encountered: