Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: use int64 instead of int32 for slow query (#14998)

rebelice45664448c5f6
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index 24915abbd8..1e31eef585 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -979,7 +979,7 @@ func (s *DatabaseService) DeleteSecret(ctx context.Context, request *v1pb.Delete
type totalValue struct {
totalQueryTime time.Duration
- totalCount int32
+ totalCount int64
}
// ListSlowQueries lists the slow queries.
diff --git a/backend/plugin/db/cockroachdb/sync.go b/backend/plugin/db/cockroachdb/sync.go
index 45fdac932b..39f1aeb302 100644
--- a/backend/plugin/db/cockroachdb/sync.go
+++ b/backend/plugin/db/cockroachdb/sync.go
@@ -995,10 +995,10 @@ func (driver *Driver) SyncSlowQuery(ctx context.Context, _ time.Time) (map[strin
for slowQueryStatisticsRows.Next() {
var database string
var fingerprint string
- var calls int32
+ var calls int64
var totalExecTime float64
var maxExecTime float64
- var rows int32
+ var rows int64
if err := slowQueryStatisticsRows.Scan(&database, &fingerprint, &calls, &totalExecTime, &maxExecTime, &rows); err != nil {
return err
}
diff --git a/backend/plugin/db/pg/sync.go b/backend/plugin/db/pg/sync.go
index 6e5fb4e675..6f1356b474 100644
--- a/backend/plugin/db/pg/sync.go
+++ b/backend/plugin/db/pg/sync.go
@@ -1458,10 +1458,10 @@ func (driver *Driver) SyncSlowQuery(ctx context.Context, _ time.Time) (map[strin
for slowQueryStatisticsRows.Next() {
var database string
var fingerprint string
- var calls int32
+ var calls int64
var totalExecTime float64
var maxExecTime float64
- var rows int32
+ var rows int64
if err := slowQueryStatisticsRows.Scan(&database, &fingerprint, &calls, &totalExecTime, &maxExecTime, &rows); err != nil {
return nil, err
}
diff --git a/backend/runner/mail/slow_query_weekly_mail.go b/backend/runner/mail/slow_query_weekly_mail.go
index 8c6ad95658..c928649047 100644
--- a/backend/runner/mail/slow_query_weekly_mail.go
+++ b/backend/runner/mail/slow_query_weekly_mail.go
@@ -409,7 +409,7 @@ func (s *SlowQueryWeeklyMailSender) generateWeeklyEmailForProject(ctx context.Co
type totalValue struct {
totalQueryTime time.Duration
- totalCount int32
+ totalCount int64
}
func durationText(duration *durationpb.Duration) string {
diff --git a/backend/store/slow_query.go b/backend/store/slow_query.go
index 9e51d0d487..53c401a41f 100644
--- a/backend/store/slow_query.go
+++ b/backend/store/slow_query.go
@@ -52,8 +52,8 @@ func (s *Store) ListSlowQuery(ctx context.Context, list *ListSlowQueryMessage) (
type slowQueryLogValue struct {
log *v1pb.SlowQueryLog
totalQueryTime time.Duration
- totalRowsSent int32
- totalRowsExamined int32
+ totalRowsSent int64
+ totalRowsExamined int64
}
func (*Store) listSlowQueryImpl(ctx context.Context, tx *Tx, list *ListSlowQueryMessage) ([]*v1pb.SlowQueryLog, error) {
diff --git a/frontend/src/components/SlowQuery/Panel/LogTable.vue b/frontend/src/components/SlowQuery/Panel/LogTable.vue
index e710505311..684f25d786 100644
--- a/frontend/src/components/SlowQuery/Panel/LogTable.vue
+++ b/frontend/src/components/SlowQuery/Panel/LogTable.vue
@@ -46,6 +46,7 @@ import {
} from "@/types";
import type { Duration } from "@/types/proto/google/protobuf/duration";
import { instanceV1HasSlowQueryDetail } from "@/utils";
+import Long from "long";
const props = withDefaults(
defineProps<{
@@ -99,8 +100,8 @@ const dataTableColumns = computed(
title: t("slow-query.total-query-count"),
key: "total_query_count",
sorter: (rowA, rowB) =>
- (rowA.log.statistics?.count ?? 0) - (rowB.log.statistics?.count ?? 0),
- render: (item) => item.log.statistics?.count,
+ (rowA.log.statistics?.count ?? Long.ZERO).compare(rowB.log.statistics?.count ?? Long.ZERO),
+ render: (item) => (item.log.statistics?.count ?? Long.ZERO).toString(),
},
{
title: t("slow-query.query-count-percent"),
@@ -134,42 +135,38 @@ const dataTableColumns = computed(
title: t("slow-query.max-rows-examined"),
key: "max_rows_examined",
sorter: (rowA, rowB) =>
- (rowA.log.statistics?.maximumRowsExamined ?? 0) -
- (rowB.log.statistics?.maximumRowsExamined ?? 0),
+ (rowA.log.statistics?.maximumRowsExamined ?? Long.ZERO).compare(rowB.log.statistics?.maximumRowsExamined ?? Long.ZERO),
render: (item) =>
instanceV1HasSlowQueryDetail(item.database.instanceResource)
- ? item.log.statistics?.maximumRowsExamined
+ ? (item.log.statistics?.maximumRowsExamined ?? Long.ZERO).toString()
: "-",
},
{
title: t("slow-query.avg-rows-examined"),
key: "avg_rows_examined",
sorter: (rowA, rowB) =>
- (rowA.log.statistics?.averageRowsExamined ?? 0) -
- (rowB.log.statistics?.averageRowsExamined ?? 0),
+ (rowA.log.statistics?.averageRowsExamined ?? Long.ZERO).compare(rowB.log.statistics?.averageRowsExamined ?? Long.ZERO),
render: (item) =>
instanceV1HasSlowQueryDetail(item.database.instanceResource)
- ? item.log.statistics?.averageRowsExamined
+ ? (item.log.statistics?.averageRowsExamined ?? Long.ZERO).toString()
: "-",
},
{
title: t("slow-query.max-rows-sent"),
key: "max_rows_sent",
sorter: (rowA, rowB) =>
- (rowA.log.statistics?.maximumRowsSent ?? 0) -
- (rowB.log.statistics?.maximumRowsSent ?? 0),
+ (rowA.log.statistics?.maximumRowsSent ?? Long.ZERO).compare(rowB.log.statistics?.maximumRowsSent ?? Long.ZERO),
render: (item) =>
instanceV1HasSlowQueryDetail(item.database.instanceResource)
- ? item.log.statistics?.maximumRowsSent
+ ? (item.log.statistics?.maximumRowsSent ?? Long.ZERO).toString()
: "-",
},
{
title: t("slow-query.avg-rows-sent"),
key: "avg_rows_sent",
sorter: (rowA, rowB) =>
- (rowA.log.statistics?.averageRowsSent ?? 0) -
- (rowB.log.statistics?.averageRowsSent ?? 0),
- render: (item) => item.log.statistics?.averageRowsSent,
+ (rowA.log.statistics?.averageRowsSent ?? Long.ZERO).compare(rowB.log.statistics?.averageRowsSent ?? Long.ZERO),
+ render: (item) => (item.log.statistics?.averageRowsSent ?? Long.ZERO).toString(),
},
];
diff --git a/frontend/src/types/proto/store/slow_query.ts b/frontend/src/types/proto/store/slow_query.ts
index 8ad880e7bf..f852eb9162 100644
--- a/frontend/src/types/proto/store/slow_query.ts
+++ b/frontend/src/types/proto/store/slow_query.ts
@@ -23,7 +23,7 @@ export interface SlowQueryStatisticsItem {
/** sql_fingerprint is the fingerprint of the slow query. */
sqlFingerprint: string;
/** count is the number of slow queries with the same fingerprint. */
- count: number;
+ count: Long;
/** latest_log_time is the time of the latest slow query with the same fingerprint. */
latestLogTime:
| Timestamp
@@ -37,13 +37,13 @@ export interface SlowQueryStatisticsItem {
| Duration
| undefined;
/** The total rows sent of the slow query log. */
- totalRowsSent: number;
+ totalRowsSent: Long;
/** The maximum rows sent of the slow query log. */
- maximumRowsSent: number;
+ maximumRowsSent: Long;
/** The total rows examined of the slow query log. */
- totalRowsExamined: number;
+ totalRowsExamined: Long;
/** The maximum rows examined of the slow query log. */
- maximumRowsExamined: number;
+ maximumRowsExamined: Long;
/** samples are the details of the sample slow queries with the same fingerprint. */
samples: SlowQueryDetails[];
}
@@ -63,9 +63,9 @@ export interface SlowQueryDetails {
| Duration
| undefined;
/** rows_sent is the number of rows sent by the slow query. */
- rowsSent: number;
+ rowsSent: Long;
/** rows_examined is the number of rows examined by the slow query. */
- rowsExamined: number;
+ rowsExamined: Long;
/** sql_text is the SQL text of the slow query. */
sqlText: string;
}
@@ -135,14 +135,14 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
function createBaseSlowQueryStatisticsItem(): SlowQueryStatisticsItem {
return {
sqlFingerprint: "",
- count: 0,
+ count: Long.ZERO,
latestLogTime: undefined,
totalQueryTime: undefined,
maximumQueryTime: undefined,
- totalRowsSent: 0,
- maximumRowsSent: 0,
- totalRowsExamined: 0,
- maximumRowsExamined: 0,
+ totalRowsSent: Long.ZERO,
+ maximumRowsSent: Long.ZERO,
+ totalRowsExamined: Long.ZERO,
+ maximumRowsExamined: Long.ZERO,
samples: [],
};
}
@@ -152,8 +152,8 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
if (message.sqlFingerprint !== "") {
writer.uint32(10).string(message.sqlFingerprint);
}
- if (message.count !== 0) {
- writer.uint32(16).int32(message.count);
+ if (!message.count.equals(Long.ZERO)) {
+ writer.uint32(16).int64(message.count.toString());
}
if (message.latestLogTime !== undefined) {
Timestamp.encode(message.latestLogTime, writer.uint32(26).fork()).join();
@@ -164,17 +164,17 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
if (message.maximumQueryTime !== undefined) {
Duration.encode(message.maximumQueryTime, writer.uint32(42).fork()).join();
}
- if (message.totalRowsSent !== 0) {
- writer.uint32(48).int32(message.totalRowsSent);
+ if (!message.totalRowsSent.equals(Long.ZERO)) {
+ writer.uint32(48).int64(message.totalRowsSent.toString());
}
- if (message.maximumRowsSent !== 0) {
- writer.uint32(56).int32(message.maximumRowsSent);
+ if (!message.maximumRowsSent.equals(Long.ZERO)) {
+ writer.uint32(56).int64(message.maximumRowsSent.toString());
}
- if (message.totalRowsExamined !== 0) {
- writer.uint32(64).int32(message.totalRowsExamined);
+ if (!message.totalRowsExamined.equals(Long.ZERO)) {
+ writer.uint32(64).int64(message.totalRowsExamined.toString());
}
- if (message.maximumRowsExamined !== 0) {
- writer.uint32(72).int32(message.maximumRowsExamined);
+ if (!message.maximumRowsExamined.equals(Long.ZERO)) {
+ writer.uint32(72).int64(message.maximumRowsExamined.toString());
}
for (const v of message.samples) {
SlowQueryDetails.encode(v!, writer.uint32(82).fork()).join();
@@ -202,7 +202,7 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
break;
}
- message.count = reader.int32();
+ message.count = Long.fromString(reader.int64().toString());
continue;
}
case 3: {
@@ -234,7 +234,7 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
break;
}
- message.totalRowsSent = reader.int32();
+ message.totalRowsSent = Long.fromString(reader.int64().toString());
continue;
}
case 7: {
@@ -242,7 +242,7 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
break;
}
- message.maximumRowsSent = reader.int32();
+ message.maximumRowsSent = Long.fromString(reader.int64().toString());
continue;
}
case 8: {
@@ -250,7 +250,7 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
break;
}
- message.totalRowsExamined = reader.int32();
+ message.totalRowsExamined = Long.fromString(reader.int64().toString());
continue;
}
case 9: {
@@ -258,7 +258,7 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
break;
}
- message.maximumRowsExamined = reader.int32();
+ message.maximumRowsExamined = Long.fromString(reader.int64().toString());
continue;
}
case 10: {
@@ -281,14 +281,14 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
fromJSON(object: any): SlowQueryStatisticsItem {
return {
sqlFingerprint: isSet(object.sqlFingerprint) ? globalThis.String(object.sqlFingerprint) : "",
- count: isSet(object.count) ? globalThis.Number(object.count) : 0,
+ count: isSet(object.count) ? Long.fromValue(object.count) : Long.ZERO,
latestLogTime: isSet(object.latestLogTime) ? fromJsonTimestamp(object.latestLogTime) : undefined,
totalQueryTime: isSet(object.totalQueryTime) ? Duration.fromJSON(object.totalQueryTime) : undefined,
maximumQueryTime: isSet(object.maximumQueryTime) ? Duration.fromJSON(object.maximumQueryTime) : undefined,
- totalRowsSent: isSet(object.totalRowsSent) ? globalThis.Number(object.totalRowsSent) : 0,
- maximumRowsSent: isSet(object.maximumRowsSent) ? globalThis.Number(object.maximumRowsSent) : 0,
- totalRowsExamined: isSet(object.totalRowsExamined) ? globalThis.Number(object.totalRowsExamined) : 0,
- maximumRowsExamined: isSet(object.maximumRowsExamined) ? globalThis.Number(object.maximumRowsExamined) : 0,
+ totalRowsSent: isSet(object.totalRowsSent) ? Long.fromValue(object.totalRowsSent) : Long.ZERO,
+ maximumRowsSent: isSet(object.maximumRowsSent) ? Long.fromValue(object.maximumRowsSent) : Long.ZERO,
+ totalRowsExamined: isSet(object.totalRowsExamined) ? Long.fromValue(object.totalRowsExamined) : Long.ZERO,
+ maximumRowsExamined: isSet(object.maximumRowsExamined) ? Long.fromValue(object.maximumRowsExamined) : Long.ZERO,
samples: globalThis.Array.isArray(object?.samples)
? object.samples.map((e: any) => SlowQueryDetails.fromJSON(e))
: [],
@@ -300,8 +300,8 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
if (message.sqlFingerprint !== "") {
obj.sqlFingerprint = message.sqlFingerprint;
}
- if (message.count !== 0) {
- obj.count = Math.round(message.count);
+ if (!message.count.equals(Long.ZERO)) {
+ obj.count = (message.count || Long.ZERO).toString();
}
if (message.latestLogTime !== undefined) {
obj.latestLogTime = fromTimestamp(message.latestLogTime).toISOString();
@@ -312,17 +312,17 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
if (message.maximumQueryTime !== undefined) {
obj.maximumQueryTime = Duration.toJSON(message.maximumQueryTime);
}
- if (message.totalRowsSent !== 0) {
- obj.totalRowsSent = Math.round(message.totalRowsSent);
+ if (!message.totalRowsSent.equals(Long.ZERO)) {
+ obj.totalRowsSent = (message.totalRowsSent || Long.ZERO).toString();
}
- if (message.maximumRowsSent !== 0) {
- obj.maximumRowsSent = Math.round(message.maximumRowsSent);
+ if (!message.maximumRowsSent.equals(Long.ZERO)) {
+ obj.maximumRowsSent = (message.maximumRowsSent || Long.ZERO).toString();
}
- if (message.totalRowsExamined !== 0) {
- obj.totalRowsExamined = Math.round(message.totalRowsExamined);
+ if (!message.totalRowsExamined.equals(Long.ZERO)) {
+ obj.totalRowsExamined = (message.totalRowsExamined || Long.ZERO).toString();
}
- if (message.maximumRowsExamined !== 0) {
- obj.maximumRowsExamined = Math.round(message.maximumRowsExamined);
+ if (!message.maximumRowsExamined.equals(Long.ZERO)) {
+ obj.maximumRowsExamined = (message.maximumRowsExamined || Long.ZERO).toString();
}
if (message.samples?.length) {
obj.samples = message.samples.map((e) => SlowQueryDetails.toJSON(e));
@@ -336,7 +336,7 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
fromPartial(object: DeepPartial<SlowQueryStatisticsItem>): SlowQueryStatisticsItem {
const message = createBaseSlowQueryStatisticsItem();
message.sqlFingerprint = object.sqlFingerprint ?? "";
- message.count = object.count ?? 0;
+ message.count = (object.count !== undefined && object.count !== null) ? Long.fromValue(object.count) : Long.ZERO;
message.latestLogTime = (object.latestLogTime !== undefined && object.latestLogTime !== null)
? Timestamp.fromPartial(object.latestLogTime)
: undefined;
@@ -346,17 +346,32 @@ export const SlowQueryStatisticsItem: MessageFns<SlowQueryStatisticsItem> = {
message.maximumQueryTime = (object.maximumQueryTime !== undefined && object.maximumQueryTime !== null)
? Duration.fromPartial(object.maximumQueryTime)
: undefined;
- message.totalRowsSent = object.totalRowsSent ?? 0;
- message.maximumRowsSent = object.maximumRowsSent ?? 0;
- message.totalRowsExamined = object.totalRowsExamined ?? 0;
- message.maximumRowsExamined = object.maximumRowsExamined ?? 0;
+ message.totalRowsSent = (object.totalRowsSent !== undefined && object.totalRowsSent !== null)
+ ? Long.fromValue(object.totalRowsSent)
+ : Long.ZERO;
+ message.maximumRowsSent = (object.maximumRowsSent !== undefined && object.maximumRowsSent !== null)
+ ? Long.fromValue(object.maximumRowsSent)
+ : Long.ZERO;
+ message.totalRowsExamined = (object.totalRowsExamined !== undefined && object.totalRowsExamined !== null)
+ ? Long.fromValue(object.totalRowsExamined)
+ : Long.ZERO;
+ message.maximumRowsExamined = (object.maximumRowsExamined !== undefined && object.maximumRowsExamined !== null)
+ ? Long.fromValue(object.maximumRowsExamined)
+ : Long.ZERO;
message.samples = object.samples?.map((e) => SlowQueryDetails.fromPartial(e)) || [];
return message;
},
};
function createBaseSlowQueryDetails(): SlowQueryDetails {
- return { startTime: undefined, queryTime: undefined, lockTime: undefined, rowsSent: 0, rowsExamined: 0, sqlText: "" };
+ return {
+ startTime: undefined,
+ queryTime: undefined,
+ lockTime: undefined,
+ rowsSent: Long.ZERO,
+ rowsExamined: Long.ZERO,
+ sqlText: "",
+ };
}
export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
@@ -370,11 +385,11 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
if (message.lockTime !== undefined) {
Duration.encode(message.lockTime, writer.uint32(26).fork()).join();
}
- if (message.rowsSent !== 0) {
- writer.uint32(32).int32(message.rowsSent);
+ if (!message.rowsSent.equals(Long.ZERO)) {
+ writer.uint32(32).int64(message.rowsSent.toString());
}
- if (message.rowsExamined !== 0) {
- writer.uint32(40).int32(message.rowsExamined);
+ if (!message.rowsExamined.equals(Long.ZERO)) {
+ writer.uint32(40).int64(message.rowsExamined.toString());
}
if (message.sqlText !== "") {
writer.uint32(50).string(message.sqlText);
@@ -418,7 +433,7 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
break;
}
- message.rowsSent = reader.int32();
+ message.rowsSent = Long.fromString(reader.int64().toString());
continue;
}
case 5: {
@@ -426,7 +441,7 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
break;
}
- message.rowsExamined = reader.int32();
+ message.rowsExamined = Long.fromString(reader.int64().toString());
continue;
}
case 6: {
@@ -451,8 +466,8 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,
queryTime: isSet(object.queryTime) ? Duration.fromJSON(object.queryTime) : undefined,
lockTime: isSet(object.lockTime) ? Duration.fromJSON(object.lockTime) : undefined,
- rowsSent: isSet(object.rowsSent) ? globalThis.Number(object.rowsSent) : 0,
- rowsExamined: isSet(object.rowsExamined) ? globalThis.Number(object.rowsExamined) : 0,
+ rowsSent: isSet(object.rowsSent) ? Long.fromValue(object.rowsSent) : Long.ZERO,
+ rowsExamined: isSet(object.rowsExamined) ? Long.fromValue(object.rowsExamined) : Long.ZERO,
sqlText: isSet(object.sqlText) ? globalThis.String(object.sqlText) : "",
};
},
@@ -468,11 +483,11 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
if (message.lockTime !== undefined) {
obj.lockTime = Duration.toJSON(message.lockTime);
}
- if (message.rowsSent !== 0) {
- obj.rowsSent = Math.round(message.rowsSent);
+ if (!message.rowsSent.equals(Long.ZERO)) {
+ obj.rowsSent = (message.rowsSent || Long.ZERO).toString();
}
- if (message.rowsExamined !== 0) {
- obj.rowsExamined = Math.round(message.rowsExamined);
+ if (!message.rowsExamined.equals(Long.ZERO)) {
+ obj.rowsExamined = (message.rowsExamined || Long.ZERO).toString();
}
if (message.sqlText !== "") {
obj.sqlText = message.sqlText;
@@ -494,8 +509,12 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
message.lockTime = (object.lockTime !== undefined && object.lockTime !== null)
? Duration.fromPartial(object.lockTime)
: undefined;
- message.rowsSent = object.rowsSent ?? 0;
- message.rowsExamined = object.rowsExamined ?? 0;
+ message.rowsSent = (object.rowsSent !== undefined && object.rowsSent !== null)
+ ? Long.fromValue(object.rowsSent)
+ : Long.ZERO;
+ message.rowsExamined = (object.rowsExamined !== undefined && object.rowsExamined !== null)
+ ? Long.fromValue(object.rowsExamined)
+ : Long.ZERO;
message.sqlText = object.sqlText ?? "";
return message;
},
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index 71e1c3c896..8c74b315e5 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -1359,7 +1359,7 @@ export interface SlowQueryStatistics {
/** The fingerprint of the slow query log. */
sqlFingerprint: string;
/** The count of the slow query log. */
- count: number;
+ count: Long;
/** The latest log time of the slow query log. */
latestLogTime:
| Timestamp
@@ -1373,13 +1373,13 @@ export interface SlowQueryStatistics {
| Duration
| undefined;
/** The average rows sent of the slow query log. */
- averageRowsSent: number;
+ averageRowsSent: Long;
/** The maximum rows sent of the slow query log. */
- maximumRowsSent: number;
+ maximumRowsSent: Long;
/** The average rows examined of the slow query log. */
- averageRowsExamined: number;
+ averageRowsExamined: Long;
/** The maximum rows examined of the slow query log. */
- maximumRowsExamined: number;
+ maximumRowsExamined: Long;
/** The percentage of the query time. */
queryTimePercent: number;
/** The percentage of the count. */
@@ -1406,9 +1406,9 @@ export interface SlowQueryDetails {
| Duration
| undefined;
/** The rows sent of the slow query log. */
- rowsSent: number;
+ rowsSent: Long;
/** The rows examined of the slow query log. */
- rowsExamined: number;
+ rowsExamined: Long;
/** The sql text of the slow query log. */
sqlText: string;
}
@@ -8643,14 +8643,14 @@ export const SlowQueryLog: MessageFns<SlowQueryLog> = {
function createBaseSlowQueryStatistics(): SlowQueryStatistics {
return {
sqlFingerprint: "",
- count: 0,
+ count: Long.ZERO,
latestLogTime: undefined,
averageQueryTime: undefined,
maximumQueryTime: undefined,
- averageRowsSent: 0,
- maximumRowsSent: 0,
- averageRowsExamined: 0,
- maximumRowsExamined: 0,
+ averageRowsSent: Long.ZERO,
+ maximumRowsSent: Long.ZERO,
+ averageRowsExamined: Long.ZERO,
+ maximumRowsExamined: Long.ZERO,
queryTimePercent: 0,
countPercent: 0,
samples: [],
@@ -8662,8 +8662,8 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
if (message.sqlFingerprint !== "") {
writer.uint32(10).string(message.sqlFingerprint);
}
- if (message.count !== 0) {
- writer.uint32(16).int32(message.count);
+ if (!message.count.equals(Long.ZERO)) {
+ writer.uint32(16).int64(message.count.toString());
}
if (message.latestLogTime !== undefined) {
Timestamp.encode(message.latestLogTime, writer.uint32(26).fork()).join();
@@ -8674,17 +8674,17 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
if (message.maximumQueryTime !== undefined) {
Duration.encode(message.maximumQueryTime, writer.uint32(42).fork()).join();
}
- if (message.averageRowsSent !== 0) {
- writer.uint32(48).int32(message.averageRowsSent);
+ if (!message.averageRowsSent.equals(Long.ZERO)) {
+ writer.uint32(48).int64(message.averageRowsSent.toString());
}
- if (message.maximumRowsSent !== 0) {
- writer.uint32(56).int32(message.maximumRowsSent);
+ if (!message.maximumRowsSent.equals(Long.ZERO)) {
+ writer.uint32(56).int64(message.maximumRowsSent.toString());
}
- if (message.averageRowsExamined !== 0) {
- writer.uint32(64).int32(message.averageRowsExamined);
+ if (!message.averageRowsExamined.equals(Long.ZERO)) {
+ writer.uint32(64).int64(message.averageRowsExamined.toString());
}
- if (message.maximumRowsExamined !== 0) {
- writer.uint32(72).int32(message.maximumRowsExamined);
+ if (!message.maximumRowsExamined.equals(Long.ZERO)) {
+ writer.uint32(72).int64(message.maximumRowsExamined.toString());
}
if (message.queryTimePercent !== 0) {
writer.uint32(81).double(message.queryTimePercent);
@@ -8718,7 +8718,7 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
break;
}
- message.count = reader.int32();
+ message.count = Long.fromString(reader.int64().toString());
continue;
}
case 3: {
@@ -8750,7 +8750,7 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
break;
}
- message.averageRowsSent = reader.int32();
+ message.averageRowsSent = Long.fromString(reader.int64().toString());
continue;
}
case 7: {
@@ -8758,7 +8758,7 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
break;
}
- message.maximumRowsSent = reader.int32();
+ message.maximumRowsSent = Long.fromString(reader.int64().toString());
continue;
}
case 8: {
@@ -8766,7 +8766,7 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
break;
}
- message.averageRowsExamined = reader.int32();
+ message.averageRowsExamined = Long.fromString(reader.int64().toString());
continue;
}
case 9: {
@@ -8774,7 +8774,7 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
break;
}
- message.maximumRowsExamined = reader.int32();
+ message.maximumRowsExamined = Long.fromString(reader.int64().toString());
continue;
}
case 10: {
@@ -8813,14 +8813,14 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
fromJSON(object: any): SlowQueryStatistics {
return {
sqlFingerprint: isSet(object.sqlFingerprint) ? globalThis.String(object.sqlFingerprint) : "",
- count: isSet(object.count) ? globalThis.Number(object.count) : 0,
+ count: isSet(object.count) ? Long.fromValue(object.count) : Long.ZERO,
latestLogTime: isSet(object.latestLogTime) ? fromJsonTimestamp(object.latestLogTime) : undefined,
averageQueryTime: isSet(object.averageQueryTime) ? Duration.fromJSON(object.averageQueryTime) : undefined,
maximumQueryTime: isSet(object.maximumQueryTime) ? Duration.fromJSON(object.maximumQueryTime) : undefined,
- averageRowsSent: isSet(object.averageRowsSent) ? globalThis.Number(object.averageRowsSent) : 0,
- maximumRowsSent: isSet(object.maximumRowsSent) ? globalThis.Number(object.maximumRowsSent) : 0,
- averageRowsExamined: isSet(object.averageRowsExamined) ? globalThis.Number(object.averageRowsExamined) : 0,
- maximumRowsExamined: isSet(object.maximumRowsExamined) ? globalThis.Number(object.maximumRowsExamined) : 0,
+ averageRowsSent: isSet(object.averageRowsSent) ? Long.fromValue(object.averageRowsSent) : Long.ZERO,
+ maximumRowsSent: isSet(object.maximumRowsSent) ? Long.fromValue(object.maximumRowsSent) : Long.ZERO,
+ averageRowsExamined: isSet(object.averageRowsExamined) ? Long.fromValue(object.averageRowsExamined) : Long.ZERO,
+ maximumRowsExamined: isSet(object.maximumRowsExamined) ? Long.fromValue(object.maximumRowsExamined) : Long.ZERO,
queryTimePercent: isSet(object.queryTimePercent) ? globalThis.Number(object.queryTimePercent) : 0,
countPercent: isSet(object.countPercent) ? globalThis.Number(object.countPercent) : 0,
samples: globalThis.Array.isArray(object?.samples)
@@ -8834,8 +8834,8 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
if (message.sqlFingerprint !== "") {
obj.sqlFingerprint = message.sqlFingerprint;
}
- if (message.count !== 0) {
- obj.count = Math.round(message.count);
+ if (!message.count.equals(Long.ZERO)) {
+ obj.count = (message.count || Long.ZERO).toString();
}
if (message.latestLogTime !== undefined) {
obj.latestLogTime = fromTimestamp(message.latestLogTime).toISOString();
@@ -8846,17 +8846,17 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
if (message.maximumQueryTime !== undefined) {
obj.maximumQueryTime = Duration.toJSON(message.maximumQueryTime);
}
- if (message.averageRowsSent !== 0) {
- obj.averageRowsSent = Math.round(message.averageRowsSent);
+ if (!message.averageRowsSent.equals(Long.ZERO)) {
+ obj.averageRowsSent = (message.averageRowsSent || Long.ZERO).toString();
}
- if (message.maximumRowsSent !== 0) {
- obj.maximumRowsSent = Math.round(message.maximumRowsSent);
+ if (!message.maximumRowsSent.equals(Long.ZERO)) {
+ obj.maximumRowsSent = (message.maximumRowsSent || Long.ZERO).toString();
}
- if (message.averageRowsExamined !== 0) {
- obj.averageRowsExamined = Math.round(message.averageRowsExamined);
+ if (!message.averageRowsExamined.equals(Long.ZERO)) {
+ obj.averageRowsExamined = (message.averageRowsExamined || Long.ZERO).toString();
}
- if (message.maximumRowsExamined !== 0) {
- obj.maximumRowsExamined = Math.round(message.maximumRowsExamined);
+ if (!message.maximumRowsExamined.equals(Long.ZERO)) {
+ obj.maximumRowsExamined = (message.maximumRowsExamined || Long.ZERO).toString();
}
if (message.queryTimePercent !== 0) {
obj.queryTimePercent = message.queryTimePercent;
@@ -8876,7 +8876,7 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
fromPartial(object: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {
const message = createBaseSlowQueryStatistics();
message.sqlFingerprint = object.sqlFingerprint ?? "";
- message.count = object.count ?? 0;
+ message.count = (object.count !== undefined && object.count !== null) ? Long.fromValue(object.count) : Long.ZERO;
message.latestLogTime = (object.latestLogTime !== undefined && object.latestLogTime !== null)
? Timestamp.fromPartial(object.latestLogTime)
: undefined;
@@ -8886,10 +8886,18 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
message.maximumQueryTime = (object.maximumQueryTime !== undefined && object.maximumQueryTime !== null)
? Duration.fromPartial(object.maximumQueryTime)
: undefined;
- message.averageRowsSent = object.averageRowsSent ?? 0;
- message.maximumRowsSent = object.maximumRowsSent ?? 0;
- message.averageRowsExamined = object.averageRowsExamined ?? 0;
- message.maximumRowsExamined = object.maximumRowsExamined ?? 0;
+ message.averageRowsSent = (object.averageRowsSent !== undefined && object.averageRowsSent !== null)
+ ? Long.fromValue(object.averageRowsSent)
+ : Long.ZERO;
+ message.maximumRowsSent = (object.maximumRowsSent !== undefined && object.maximumRowsSent !== null)
+ ? Long.fromValue(object.maximumRowsSent)
+ : Long.ZERO;
+ message.averageRowsExamined = (object.averageRowsExamined !== undefined && object.averageRowsExamined !== null)
+ ? Long.fromValue(object.averageRowsExamined)
+ : Long.ZERO;
+ message.maximumRowsExamined = (object.maximumRowsExamined !== undefined && object.maximumRowsExamined !== null)
+ ? Long.fromValue(object.maximumRowsExamined)
+ : Long.ZERO;
message.queryTimePercent = object.queryTimePercent ?? 0;
message.countPercent = object.countPercent ?? 0;
message.samples = object.samples?.map((e) => SlowQueryDetails.fromPartial(e)) || [];
@@ -8898,7 +8906,14 @@ export const SlowQueryStatistics: MessageFns<SlowQueryStatistics> = {
};
function createBaseSlowQueryDetails(): SlowQueryDetails {
- return { startTime: undefined, queryTime: undefined, lockTime: undefined, rowsSent: 0, rowsExamined: 0, sqlText: "" };
+ return {
+ startTime: undefined,
+ queryTime: undefined,
+ lockTime: undefined,
+ rowsSent: Long.ZERO,
+ rowsExamined: Long.ZERO,
+ sqlText: "",
+ };
}
export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
@@ -8912,11 +8927,11 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
if (message.lockTime !== undefined) {
Duration.encode(message.lockTime, writer.uint32(26).fork()).join();
}
- if (message.rowsSent !== 0) {
- writer.uint32(32).int32(message.rowsSent);
+ if (!message.rowsSent.equals(Long.ZERO)) {
+ writer.uint32(32).int64(message.rowsSent.toString());
}
- if (message.rowsExamined !== 0) {
- writer.uint32(40).int32(message.rowsExamined);
+ if (!message.rowsExamined.equals(Long.ZERO)) {
+ writer.uint32(40).int64(message.rowsExamined.toString());
}
if (message.sqlText !== "") {
writer.uint32(50).string(message.sqlText);
@@ -8960,7 +8975,7 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
break;
}
- message.rowsSent = reader.int32();
+ message.rowsSent = Long.fromString(reader.int64().toString());
continue;
}
case 5: {
@@ -8968,7 +8983,7 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
break;
}
- message.rowsExamined = reader.int32();
+ message.rowsExamined = Long.fromString(reader.int64().toString());
continue;
}
case 6: {
@@ -8993,8 +9008,8 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,
queryTime: isSet(object.queryTime) ? Duration.fromJSON(object.queryTime) : undefined,
lockTime: isSet(object.lockTime) ? Duration.fromJSON(object.lockTime) : undefined,
- rowsSent: isSet(object.rowsSent) ? globalThis.Number(object.rowsSent) : 0,
- rowsExamined: isSet(object.rowsExamined) ? globalThis.Number(object.rowsExamined) : 0,
+ rowsSent: isSet(object.rowsSent) ? Long.fromValue(object.rowsSent) : Long.ZERO,
+ rowsExamined: isSet(object.rowsExamined) ? Long.fromValue(object.rowsExamined) : Long.ZERO,
sqlText: isSet(object.sqlText) ? globalThis.String(object.sqlText) : "",
};
},
@@ -9010,11 +9025,11 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
if (message.lockTime !== undefined) {
obj.lockTime = Duration.toJSON(message.lockTime);
}
- if (message.rowsSent !== 0) {
- obj.rowsSent = Math.round(message.rowsSent);
+ if (!message.rowsSent.equals(Long.ZERO)) {
+ obj.rowsSent = (message.rowsSent || Long.ZERO).toString();
}
- if (message.rowsExamined !== 0) {
- obj.rowsExamined = Math.round(message.rowsExamined);
+ if (!message.rowsExamined.equals(Long.ZERO)) {
+ obj.rowsExamined = (message.rowsExamined || Long.ZERO).toString();
}
if (message.sqlText !== "") {
obj.sqlText = message.sqlText;
@@ -9036,8 +9051,12 @@ export const SlowQueryDetails: MessageFns<SlowQueryDetails> = {
message.lockTime = (object.lockTime !== undefined && object.lockTime !== null)
? Duration.fromPartial(object.lockTime)
: undefined;
- message.rowsSent = object.rowsSent ?? 0;
- message.rowsExamined = object.rowsExamined ?? 0;
+ message.rowsSent = (object.rowsSent !== undefined && object.rowsSent !== null)
+ ? Long.fromValue(object.rowsSent)
+ : Long.ZERO;
+ message.rowsExamined = (object.rowsExamined !== undefined && object.rowsExamined !== null)
+ ? Long.fromValue(object.rowsExamined)
+ : Long.ZERO;
message.sqlText = object.sqlText ?? "";
return message;
},
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index c74913ea93..a26dad16d1 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -13925,13 +13925,11 @@ components:
type: string
description: The lock time of the slow query log.
rowsSent:
- type: integer
+ type: string
description: The rows sent of the slow query log.
- format: int32
rowsExamined:
- type: integer
+ type: string
description: The rows examined of the slow query log.
- format: int32
sqlText:
type: string
description: The sql text of the slow query log.
@@ -13968,9 +13966,8 @@ components:
type: string
description: The fingerprint of the slow query log.
count:
- type: integer
+ type: string
description: The count of the slow query log.
- format: int32
latestLogTime:
type: string
description: The latest log time of the slow query log.
@@ -13984,21 +13981,17 @@ components:
type: string
description: The maximum query time of the slow query log.
averageRowsSent:
- type: integer
+ type: string
description: The average rows sent of the slow query log.
- format: int32
maximumRowsSent:
- type: integer
+ type: string
description: The maximum rows sent of the slow query log.
- format: int32
averageRowsExamined:
- type: integer
+ type: string
description: The average rows examined of the slow query log.
- format: int32
maximumRowsExamined:
- type: integer
+ type: string
description: The maximum rows examined of the slow query log.
- format: int32
queryTimePercent:
type: number
description: The percentage of the query time.
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index d0165f6cd0..b3c8c1409f 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -4930,8 +4930,8 @@ SlowQueryDetails is the details of a slow query.
| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | start_time is the start time of the slow query. |
| query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | query_time is the query time of the slow query. |
| lock_time | [google.protobuf.Duration](#google-protobuf-Duration) | | lock_time is the lock time of the slow query. |
-| rows_sent | [int32](#int32) | | rows_sent is the number of rows sent by the slow query. |
-| rows_examined | [int32](#int32) | | rows_examined is the number of rows examined by the slow query. |
+| rows_sent | [int64](#int64) | | rows_sent is the number of rows sent by the slow query. |
+| rows_examined | [int64](#int64) | | rows_examined is the number of rows examined by the slow query. |
| sql_text | [string](#string) | | sql_text is the SQL text of the slow query. |
@@ -4963,14 +4963,14 @@ SlowQueryStatisticsItem is the item of slow query statistics.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| sql_fingerprint | [string](#string) | | sql_fingerprint is the fingerprint of the slow query. |
-| count | [int32](#int32) | | count is the number of slow queries with the same fingerprint. |
+| count | [int64](#int64) | | count is the number of slow queries with the same fingerprint. |
| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | latest_log_time is the time of the latest slow query with the same fingerprint. |
| total_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The total query time of the slow query log. |
| maximum_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The maximum query time of the slow query log. |
-| total_rows_sent | [int32](#int32) | | The total rows sent of the slow query log. |
-| maximum_rows_sent | [int32](#int32) | | The maximum rows sent of the slow query log. |
-| total_rows_examined | [int32](#int32) | | The total rows examined of the slow query log. |
-| maximum_rows_examined | [int32](#int32) | | The maximum rows examined of the slow query log. |
+| total_rows_sent | [int64](#int64) | | The total rows sent of the slow query log. |
+| maximum_rows_sent | [int64](#int64) | | The maximum rows sent of the slow query log. |
+| total_rows_examined | [int64](#int64) | | The total rows examined of the slow query log. |
+| maximum_rows_examined | [int64](#int64) | | The maximum rows examined of the slow query log. |
| samples | [SlowQueryDetails](#bytebase-store-SlowQueryDetails) | repeated | samples are the details of the sample slow queries with the same fingerprint. |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 584353527d..6661c14d86 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -12289,14 +12289,14 @@ Default to this mode.</p></td>
<tr>
<td>rows_sent</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>rows_sent is the number of rows sent by the slow query. </p></td>
</tr>
<tr>
<td>rows_examined</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>rows_examined is the number of rows examined by the slow query. </p></td>
</tr>
@@ -12358,7 +12358,7 @@ Default to this mode.</p></td>
<tr>
<td>count</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>count is the number of slow queries with the same fingerprint. </p></td>
</tr>
@@ -12386,28 +12386,28 @@ Default to this mode.</p></td>
<tr>
<td>total_rows_sent</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The total rows sent of the slow query log. </p></td>
</tr>
<tr>
<td>maximum_rows_sent</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The maximum rows sent of the slow query log. </p></td>
</tr>
<tr>
<td>total_rows_examined</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The total rows examined of the slow query log. </p></td>
</tr>
<tr>
<td>maximum_rows_examined</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The maximum rows examined of the slow query log. </p></td>
</tr>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index cd25c8d347..117f2d4816 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -3059,8 +3059,8 @@ SlowQueryDetails is the details of the slow query log.
| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The start time of the slow query log. |
| query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The query time of the slow query log. |
| lock_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The lock time of the slow query log. |
-| rows_sent | [int32](#int32) | | The rows sent of the slow query log. |
-| rows_examined | [int32](#int32) | | The rows examined of the slow query log. |
+| rows_sent | [int64](#int64) | | The rows sent of the slow query log. |
+| rows_examined | [int64](#int64) | | The rows examined of the slow query log. |
| sql_text | [string](#string) | | The sql text of the slow query log. |
@@ -3094,14 +3094,14 @@ SlowQueryStatistics is the statistics of the slow query log.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| sql_fingerprint | [string](#string) | | The fingerprint of the slow query log. |
-| count | [int32](#int32) | | The count of the slow query log. |
+| count | [int64](#int64) | | The count of the slow query log. |
| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest log time of the slow query log. |
| average_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The average query time of the slow query log. |
| maximum_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The maximum query time of the slow query log. |
-| average_rows_sent | [int32](#int32) | | The average rows sent of the slow query log. |
-| maximum_rows_sent | [int32](#int32) | | The maximum rows sent of the slow query log. |
-| average_rows_examined | [int32](#int32) | | The average rows examined of the slow query log. |
-| maximum_rows_examined | [int32](#int32) | | The maximum rows examined of the slow query log. |
+| average_rows_sent | [int64](#int64) | | The average rows sent of the slow query log. |
+| maximum_rows_sent | [int64](#int64) | | The maximum rows sent of the slow query log. |
+| average_rows_examined | [int64](#int64) | | The average rows examined of the slow query log. |
+| maximum_rows_examined | [int64](#int64) | | The maximum rows examined of the slow query log. |
| query_time_percent | [double](#double) | | The percentage of the query time. |
| count_percent | [double](#double) | | The percentage of the count. |
| samples | [SlowQueryDetails](#bytebase-v1-SlowQueryDetails) | repeated | Samples are details of the sample slow query logs with the same fingerprint. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 5bc68cbe15..7589a781c7 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -9173,14 +9173,14 @@ instances/{instance}/databases/{database}/secrets/{secret} </p></td>
<tr>
<td>rows_sent</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The rows sent of the slow query log. </p></td>
</tr>
<tr>
<td>rows_examined</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The rows examined of the slow query log. </p></td>
</tr>
@@ -9258,7 +9258,7 @@ The format is &#34;projects/{project}&#34;. </p></td>
<tr>
<td>count</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The count of the slow query log. </p></td>
</tr>
@@ -9286,28 +9286,28 @@ The format is &#34;projects/{project}&#34;. </p></td>
<tr>
<td>average_rows_sent</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The average rows sent of the slow query log. </p></td>
</tr>
<tr>
<td>maximum_rows_sent</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The maximum rows sent of the slow query log. </p></td>
</tr>
<tr>
<td>average_rows_examined</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The average rows examined of the slow query log. </p></td>
</tr>
<tr>
<td>maximum_rows_examined</td>
- <td><a href="#int32">int32</a></td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p>The maximum rows examined of the slow query log. </p></td>
</tr>
diff --git a/proto/generated-go/store/slow_query.pb.go b/proto/generated-go/store/slow_query.pb.go
index 4590c5e204..486c41078b 100644
--- a/proto/generated-go/store/slow_query.pb.go
+++ b/proto/generated-go/store/slow_query.pb.go
@@ -74,7 +74,7 @@ type SlowQueryStatisticsItem struct {
// sql_fingerprint is the fingerprint of the slow query.
SqlFingerprint string `protobuf:"bytes,1,opt,name=sql_fingerprint,json=sqlFingerprint,proto3" json:"sql_fingerprint,omitempty"`
// count is the number of slow queries with the same fingerprint.
- Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
+ Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// latest_log_time is the time of the latest slow query with the same fingerprint.
LatestLogTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=latest_log_time,json=latestLogTime,proto3" json:"latest_log_time,omitempty"`
// The total query time of the slow query log.
@@ -82,13 +82,13 @@ type SlowQueryStatisticsItem struct {
// The maximum query time of the slow query log.
MaximumQueryTime *durationpb.Duration `protobuf:"bytes,5,opt,name=maximum_query_time,json=maximumQueryTime,proto3" json:"maximum_query_time,omitempty"`
// The total rows sent of the slow query log.
- TotalRowsSent int32 `protobuf:"varint,6,opt,name=total_rows_sent,json=totalRowsSent,proto3" json:"total_rows_sent,omitempty"`
+ TotalRowsSent int64 `protobuf:"varint,6,opt,name=total_rows_sent,json=totalRowsSent,proto3" json:"total_rows_sent,omitempty"`
// The maximum rows sent of the slow query log.
- MaximumRowsSent int32 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
+ MaximumRowsSent int64 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
// The total rows examined of the slow query log.
- TotalRowsExamined int32 `protobuf:"varint,8,opt,name=total_rows_examined,json=totalRowsExamined,proto3" json:"total_rows_examined,omitempty"`
+ TotalRowsExamined int64 `protobuf:"varint,8,opt,name=total_rows_examined,json=totalRowsExamined,proto3" json:"total_rows_examined,omitempty"`
// The maximum rows examined of the slow query log.
- MaximumRowsExamined int32 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
+ MaximumRowsExamined int64 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
// samples are the details of the sample slow queries with the same fingerprint.
Samples []*SlowQueryDetails `protobuf:"bytes,10,rep,name=samples,proto3" json:"samples,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -132,7 +132,7 @@ func (x *SlowQueryStatisticsItem) GetSqlFingerprint() string {
return ""
}
-func (x *SlowQueryStatisticsItem) GetCount() int32 {
+func (x *SlowQueryStatisticsItem) GetCount() int64 {
if x != nil {
return x.Count
}
@@ -160,28 +160,28 @@ func (x *SlowQueryStatisticsItem) GetMaximumQueryTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryStatisticsItem) GetTotalRowsSent() int32 {
+func (x *SlowQueryStatisticsItem) GetTotalRowsSent() int64 {
if x != nil {
return x.TotalRowsSent
}
return 0
}
-func (x *SlowQueryStatisticsItem) GetMaximumRowsSent() int32 {
+func (x *SlowQueryStatisticsItem) GetMaximumRowsSent() int64 {
if x != nil {
return x.MaximumRowsSent
}
return 0
}
-func (x *SlowQueryStatisticsItem) GetTotalRowsExamined() int32 {
+func (x *SlowQueryStatisticsItem) GetTotalRowsExamined() int64 {
if x != nil {
return x.TotalRowsExamined
}
return 0
}
-func (x *SlowQueryStatisticsItem) GetMaximumRowsExamined() int32 {
+func (x *SlowQueryStatisticsItem) GetMaximumRowsExamined() int64 {
if x != nil {
return x.MaximumRowsExamined
}
@@ -205,9 +205,9 @@ type SlowQueryDetails struct {
// lock_time is the lock time of the slow query.
LockTime *durationpb.Duration `protobuf:"bytes,3,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// rows_sent is the number of rows sent by the slow query.
- RowsSent int32 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
+ RowsSent int64 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
// rows_examined is the number of rows examined by the slow query.
- RowsExamined int32 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
+ RowsExamined int64 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
// sql_text is the SQL text of the slow query.
SqlText string `protobuf:"bytes,6,opt,name=sql_text,json=sqlText,proto3" json:"sql_text,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -265,14 +265,14 @@ func (x *SlowQueryDetails) GetLockTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryDetails) GetRowsSent() int32 {
+func (x *SlowQueryDetails) GetRowsSent() int64 {
if x != nil {
return x.RowsSent
}
return 0
}
-func (x *SlowQueryDetails) GetRowsExamined() int32 {
+func (x *SlowQueryDetails) GetRowsExamined() int64 {
if x != nil {
return x.RowsExamined
}
@@ -306,7 +306,7 @@ var file_store_slow_query_proto_rawDesc = []byte{
0x71, 0x6c, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x71, 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70,
0x72, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61,
+ 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61,
0x74, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
@@ -321,15 +321,15 @@ var file_store_slow_query_proto_rawDesc = []byte{
0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x69,
0x6d, 0x75, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73,
+ 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73,
0x53, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f,
- 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74,
0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65,
- 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x74,
+ 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64,
0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x77, 0x73,
- 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d,
0x69, 0x6e, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18,
0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
@@ -348,9 +348,9 @@ var file_store_slow_query_proto_rawDesc = []byte{
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12,
+ 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12,
0x23, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d,
0x69, 0x6e, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x71, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x42,
0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
index 57df7f53de..0691365923 100644
--- a/proto/generated-go/v1/database_service.pb.go
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -4763,7 +4763,7 @@ type SlowQueryStatistics struct {
// The fingerprint of the slow query log.
SqlFingerprint string `protobuf:"bytes,1,opt,name=sql_fingerprint,json=sqlFingerprint,proto3" json:"sql_fingerprint,omitempty"`
// The count of the slow query log.
- Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
+ Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// The latest log time of the slow query log.
LatestLogTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=latest_log_time,json=latestLogTime,proto3" json:"latest_log_time,omitempty"`
// The average query time of the slow query log.
@@ -4771,13 +4771,13 @@ type SlowQueryStatistics struct {
// The maximum query time of the slow query log.
MaximumQueryTime *durationpb.Duration `protobuf:"bytes,5,opt,name=maximum_query_time,json=maximumQueryTime,proto3" json:"maximum_query_time,omitempty"`
// The average rows sent of the slow query log.
- AverageRowsSent int32 `protobuf:"varint,6,opt,name=average_rows_sent,json=averageRowsSent,proto3" json:"average_rows_sent,omitempty"`
+ AverageRowsSent int64 `protobuf:"varint,6,opt,name=average_rows_sent,json=averageRowsSent,proto3" json:"average_rows_sent,omitempty"`
// The maximum rows sent of the slow query log.
- MaximumRowsSent int32 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
+ MaximumRowsSent int64 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
// The average rows examined of the slow query log.
- AverageRowsExamined int32 `protobuf:"varint,8,opt,name=average_rows_examined,json=averageRowsExamined,proto3" json:"average_rows_examined,omitempty"`
+ AverageRowsExamined int64 `protobuf:"varint,8,opt,name=average_rows_examined,json=averageRowsExamined,proto3" json:"average_rows_examined,omitempty"`
// The maximum rows examined of the slow query log.
- MaximumRowsExamined int32 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
+ MaximumRowsExamined int64 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
// The percentage of the query time.
QueryTimePercent float64 `protobuf:"fixed64,10,opt,name=query_time_percent,json=queryTimePercent,proto3" json:"query_time_percent,omitempty"`
// The percentage of the count.
@@ -4826,7 +4826,7 @@ func (x *SlowQueryStatistics) GetSqlFingerprint() string {
return ""
}
-func (x *SlowQueryStatistics) GetCount() int32 {
+func (x *SlowQueryStatistics) GetCount() int64 {
if x != nil {
return x.Count
}
@@ -4854,28 +4854,28 @@ func (x *SlowQueryStatistics) GetMaximumQueryTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryStatistics) GetAverageRowsSent() int32 {
+func (x *SlowQueryStatistics) GetAverageRowsSent() int64 {
if x != nil {
return x.AverageRowsSent
}
return 0
}
-func (x *SlowQueryStatistics) GetMaximumRowsSent() int32 {
+func (x *SlowQueryStatistics) GetMaximumRowsSent() int64 {
if x != nil {
return x.MaximumRowsSent
}
return 0
}
-func (x *SlowQueryStatistics) GetAverageRowsExamined() int32 {
+func (x *SlowQueryStatistics) GetAverageRowsExamined() int64 {
if x != nil {
return x.AverageRowsExamined
}
return 0
}
-func (x *SlowQueryStatistics) GetMaximumRowsExamined() int32 {
+func (x *SlowQueryStatistics) GetMaximumRowsExamined() int64 {
if x != nil {
return x.MaximumRowsExamined
}
@@ -4913,9 +4913,9 @@ type SlowQueryDetails struct {
// The lock time of the slow query log.
LockTime *durationpb.Duration `protobuf:"bytes,3,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// The rows sent of the slow query log.
- RowsSent int32 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
+ RowsSent int64 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
// The rows examined of the slow query log.
- RowsExamined int32 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
+ RowsExamined int64 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
// The sql text of the slow query log.
SqlText string `protobuf:"bytes,6,opt,name=sql_text,json=sqlText,proto3" json:"sql_text,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -4973,14 +4973,14 @@ func (x *SlowQueryDetails) GetLockTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryDetails) GetRowsSent() int32 {
+func (x *SlowQueryDetails) GetRowsSent() int64 {
if x != nil {
return x.RowsSent
}
return 0
}
-func (x *SlowQueryDetails) GetRowsExamined() int32 {
+func (x *SlowQueryDetails) GetRowsExamined() int64 {
if x != nil {
return x.RowsExamined
}
@@ -7457,7 +7457,7 @@ var file_v1_database_service_proto_rawDesc = []byte{
0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0e, 0x73, 0x71, 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69,
0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65,
+ 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65,
0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c,
@@ -7472,16 +7472,16 @@ var file_v1_database_service_proto_rawDesc = []byte{
0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a,
0x0a, 0x11, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73,
- 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61,
+ 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61,
0x67, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
- 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f,
+ 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f,
0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67,
0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x6f,
+ 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x6f,
0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69,
- 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d,
+ 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d,
0x75, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x2c,
0x0a, 0x12, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x70, 0x65, 0x72,
0x63, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x71, 0x75, 0x65, 0x72,
@@ -7504,9 +7504,9 @@ var file_v1_database_service_proto_rawDesc = []byte{
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09,
- 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x6f, 0x77,
- 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
+ 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x19,
0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x73, 0x71, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x4c, 0x69,
diff --git a/proto/store/slow_query.proto b/proto/store/slow_query.proto
index 30297edcd4..4792c0d255 100644
--- a/proto/store/slow_query.proto
+++ b/proto/store/slow_query.proto
@@ -19,7 +19,7 @@ message SlowQueryStatisticsItem {
string sql_fingerprint = 1;
// count is the number of slow queries with the same fingerprint.
- int32 count = 2;
+ int64 count = 2;
// latest_log_time is the time of the latest slow query with the same fingerprint.
google.protobuf.Timestamp latest_log_time = 3;
@@ -31,16 +31,16 @@ message SlowQueryStatisticsItem {
google.protobuf.Duration maximum_query_time = 5;
// The total rows sent of the slow query log.
- int32 total_rows_sent = 6;
+ int64 total_rows_sent = 6;
// The maximum rows sent of the slow query log.
- int32 maximum_rows_sent = 7;
+ int64 maximum_rows_sent = 7;
// The total rows examined of the slow query log.
- int32 total_rows_examined = 8;
+ int64 total_rows_examined = 8;
// The maximum rows examined of the slow query log.
- int32 maximum_rows_examined = 9;
+ int64 maximum_rows_examined = 9;
// samples are the details of the sample slow queries with the same fingerprint.
repeated SlowQueryDetails samples = 10;
@@ -58,10 +58,10 @@ message SlowQueryDetails {
google.protobuf.Duration lock_time = 3;
// rows_sent is the number of rows sent by the slow query.
- int32 rows_sent = 4;
+ int64 rows_sent = 4;
// rows_examined is the number of rows examined by the slow query.
- int32 rows_examined = 5;
+ int64 rows_examined = 5;
// sql_text is the SQL text of the slow query.
string sql_text = 6;
diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.proto
index 581b6599cc..4af24788d6 100644
--- a/proto/v1/database_service.proto
+++ b/proto/v1/database_service.proto
@@ -1235,7 +1235,7 @@ message SlowQueryStatistics {
string sql_fingerprint = 1;
// The count of the slow query log.
- int32 count = 2;
+ int64 count = 2;
// The latest log time of the slow query log.
google.protobuf.Timestamp latest_log_time = 3;
@@ -1247,16 +1247,16 @@ message SlowQueryStatistics {
google.protobuf.Duration maximum_query_time = 5;
// The average rows sent of the slow query log.
- int32 average_rows_sent = 6;
+ int64 average_rows_sent = 6;
// The maximum rows sent of the slow query log.
- int32 maximum_rows_sent = 7;
+ int64 maximum_rows_sent = 7;
// The average rows examined of the slow query log.
- int32 average_rows_examined = 8;
+ int64 average_rows_examined = 8;
// The maximum rows examined of the slow query log.
- int32 maximum_rows_examined = 9;
+ int64 maximum_rows_examined = 9;
// The percentage of the query time.
double query_time_percent = 10;
@@ -1281,10 +1281,10 @@ message SlowQueryDetails {
google.protobuf.Duration lock_time = 3;
// The rows sent of the slow query log.
- int32 rows_sent = 4;
+ int64 rows_sent = 4;
// The rows examined of the slow query log.
- int32 rows_examined = 5;
+ int64 rows_examined = 5;
// The sql text of the slow query log.
string sql_text = 6;