You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: go/vt/vttablet/tabletserver/schema/db.go
+12
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,18 @@ SELECT f.name, i.UDF_RETURN_TYPE, f.type FROM mysql.func f left join performance
114
114
`
115
115
// fetchAggregateUdfs queries fetches all the aggregate user defined functions.
116
116
fetchAggregateUdfs=`select function_name, function_return_type, function_type from %s.udfs`
117
+
118
+
// fetch a list of all partitions
119
+
fetchPartitions=`select table_name, partition_name from information_schema.partitions where table_schema = database() and partition_name is not null`
120
+
121
+
// fetch the estimated number of rows and the clustered index byte size for all tables
122
+
fetchTableRowCountClusteredIndex=`select table_name, n_rows, clustered_index_size * @@innodb_page_size from mysql.innodb_table_stats where database_name = database()`
123
+
124
+
// fetch the byte size of all indexes
125
+
fetchIndexSizes=`select table_name, index_name, stat_value * @@innodb_page_size from mysql.innodb_index_stats where database_name = database() and stat_name = 'size'`
126
+
127
+
// fetch the cardinality of all indexes
128
+
fetchIndexCardinalities=`select table_name, index_name, max(cardinality) from information_schema.statistics s where table_schema = database() group by s.table_name, s.index_name`
117
129
)
118
130
119
131
// reloadTablesDataInDB reloads teh tables information we have stored in our database we use for schema-tracking.
0 commit comments