SQLite format 3@ )*). ?-Aindexsqlite_autoindex_content_1content$++tableproperty_masterproperty_masterCREATE TABLE [property_master] ( [property_id] INTEGER NOT NULL PRIMARY KEY, [property_name] VARCHAR(255) NOT NULL)!!Qtableudo_masterudo_masterCREATE TABLE [udo_master] ( [id] INTEGER NOT NULL PRIMARY KEY, [name] VARCHAR(255) NOT NULL)P))[tableschema_versionschema_versionCREATE TABLE [schema_version] ( [schema_desc] TEXT, [schema_major_version] TEXT, [schema_minor_version] TEXT, PRIMARY KEY ([schema_major_version], [schema_minor_version]));O)indexsqlite_autoindex_schema_version_1schema_version  4.60460 460(zkU:RpT4fH3#7 1 MCluster_RedoBuffer27babb07e9b06598271792864472d07f6 / MCluster_Data_Free8b218f99cba4d8ee1d28626cf3589920#)DiskQueueDepth"SwapUsage!-FreeStorageSpace )FreeableMemory ReadIOPSWriteIOPS)CPUUtilization?Performance_Schema_EventsETables_with_full_table_scans=Table_InnoDB_Buffer_Pool9Schema_Redundant_Index=Unused_Indexes_In_Schema?Users_statements_executed=Object_accessed_the_most=Users_Hitting_by_File_ioCUsers_Hitting_by_Tablescans;Host_Hitting_by_File_ioAHost_Hitting_by_TablescansATables_Without_Constraints;Non-InnoDB_Tables_Count7Percona_Active_Tables5Cluster_RedoLogspace +Users_Connected)'Cluster_Nodes1Cluster_RedoBuffer 9Percona_Unused_Indexes/Primary_Key_Ratio !Data_Types)FullText_Index#Tables_Size)Storage_Engine'Database_Size !WorstIndex- MDiskInfo0f27dd8cffd8de3e89fc63'& eye +metricValueType !metricUnit !metricKind !metricType+purgingInterval !keyColumns serverssql1collectionInterval enabled~)~[$Q#<";!9  wB6$j%X:8, 0 7 * q CYA!!Mtableudo_masterudo_masterCREATE TABLE [udo_master] ( [id] INTEGER NOT NULL PRIMARY KEY, [name] VARCHAR(255) NOT NULL, "type" INTEGER NOT NULL DEFAULT 1, "md5" VARCHAR DEFAULT '')P))[tableschema_versionschema_versionCREATE TABLE [schema_version] ( [schema_desc] TEXT, [schema_major_version] TEXT, [schema_minor_version] TEXT, PRIMARY KEY ([schema_major_version], [schema_minor_version]));O)indexsqlite_autoindex_schema_version_1schema_version$++tableproperty_masterproperty_masterCREATE TABLE [property_master] ( [property_id] INTEGER NOT NULL PRIMARY KEY, [property_name] VARCHAR(255) NOT NULL) v++#indexunique_propertyproperty_master CREATE UNIQUE INDEX [unique_property] ON [property_master]([property_name])D_tablecontentcontentCREATE TABLE [content] ( [udo_id] INTEGER NOT NULL, [property_id] INTEGER NOT NULL, [value] VARCHAR(255) NOT NULL, PRIMARY KEY([udo_id], [property_id]), FOREIGN KEY ([udo_id]) REFERENCES [udo_master]([id]), FOREIGN KEY ([property_id]) REFERENCES [property_master]([property_id]))-Aindexsqlite_autoindex_content_1content eye+metricValueType !metricUnit !metricKind!metricType+purgingInterval!keyColumns serverssql1collectionInterval enabled \ /H Q`G/?, 604800\00 all_dG/* Requirement : MySQL v5.0+ This query will return TableName and number of records it has. */ SELECT TABLE_SCHEMA AS `Database`, TABLE_NAME AS `Table`, TABLE_ROWS AS `Rows` FROM information_schema.TABLES ;+Database, Table~ 300 300 I /* Requirement : MySQL v5.0+ SQL script to grab the top 10 worst performing indexes */ SELECT t.TABLE_SCHEMA AS `Db`, t.TABLE_NAME AS `Table`, s.INDEX_NAME AS `Index_Name`, s.COLUMN_NAME AS `Field_Name`, s.SEQ_IN_INDEX `Seq_In_Index`, s2.max_columns AS `Max_Cols`, s.CARDINALITY AS `Card`, t.TABLE_ROWS AS `Est_rows`, ROUND( ( ( s.CARDINALITY / IFNULL(t.TABLE_ROWS, 0.01) ) * 100 ), 2 ) AS `Sel %` F k`*E< r 604800" n 300s0m 0Tu'/* Requirement : MySQL Cluster v7.1.3 This query will return percentage of free logspace size */ SELECT @total := (SELECT SUM(total) FROM ndbinfo.logspaces) AS `Total`, @used := (SELECT SUM(used) FROM ndbinfo.logspaces) AS `Used`, ((@total - @used) / @total) * 100 AS `Free_Redo_Log_Space` ;5 vallw3Free_Redo_Log_Space t300q- Host_Name, Users[p5 /* Requirement : MySQL v5.0+ This query will return currently connected users */ SELECT SUBSTRING_INDEX(HOST, ':', 1) AS `Host_Name`, GROUP_CONCAT(DISTINCT USER) AS `Users`, COUNT(*) AS `No_Of_Connections` FROM information_schema.PROCESSLIST WHERE `user` != 'system user' GROUP BY `Host_Name` ORDER BY No_Of_connections DESC ; o all h ]yE= y/* Requirement : MySQL v5.0+ This query will return Top 5 databases on server w.r.t. Size */ SELECT TABLE_SCHEMA AS `Database`, SUM( (data_length + index_length) / (1024 * 1024) ) AS `Database_Size` FROM information_schema.TABLES GROUP BY table_schema ORDER BY `Database_Size` DESC LIMIT 5 ; all%#|, 3Db,Table,Index_Name00 300 300#7# ## 604800 604800gH g \ i^  ;.   allDatabase  S/* Requirement : MySQL v5.0+ This query will return Number of tables w.r.t. Engine_Type */ SELECT ENGINE AS `Engine`, COUNT(*) AS `Tables`, CONCAT( ROUND(SUM(table_rows) / 1000000, 2), 'M' ) AS `Rows`, CONCAT( ROUND( SUM(data_length) / (1024 * 1024 * 1024), 2 ), 'G' ) AS `Data`, CONCAT( ROUND( SUM(index_length) / (1024 * 1024 * 1024), 2 ), 'G' ) AS `Index`, CONCAT( ROUND( SUM(data_length + index_length) / (1024 * 1024 * 1024), 2 ), 'G' ) AS `Total_Size`, ROUND( SUM(index_length) / SUM(data_length), 2 ) AS `Index_Frac` FROM information_schema.TABLES WHERE ENGINE != 'NULL' GROUP BY ENGINE ORDER BY SUM(data_length + index_length) DESC ; # 60480000 300 Tables Engine/* Requirement : MySQL v5.0+ This query will return Total number of tables and size */ SELECT COUNT(*) AS `Tables`, CONCAT( ROUND(SUM(table_rows) / 1000000, 2), 'M' ) AS `Rows`, CONCAT( ROUND( SUM(data_length) / (1024 * 1024 * 1024), 2 ), 'G' ) AS `Data`, CONCAT( ROUND( SUM(index_length) / (1024 * 1024 * 1024), 2 ), 'G' ) AS `Index`, CONCAT( ROUND( SUM(data_length + index_length) / (1024 * 1024 * 1024), 2 ), 'G' ) AS `Total_Size`, ROUND( SUM(index_length) / SUM(data_length), 2 ) AS `Index_Frac` FROM information_schema.TABLES ; all 604800 all ?4  ,300+0 *604800))STable_Schema,Table_Name,Column_Name (all*'S/* Requirement : MySQL v5.0+ This query will return list of FULLTEXT indexes */ SELECT TABLE_SCHEMA AS `Table_Schema`, TABLE_NAME AS `Table_Name`, INDEX_NAME AS `Index_Name`, SEQ_IN_INDEX AS `Seq_In_Index`, COLUMN_NAME AS `Column_Name`, CARDINALITY AS `Cardinality`, NULLABLE AS `Nullable` FROM information_schema.STATISTICS WHERE INDEX_TYPE LIKE 'FULLTEXT%' ORDER BY TABLE_SCHEMA, TABLE_NAME ; &300%0ROM INFORMATION_SCHEMA.STATISTICS s INNER JOIN INFORMATION_SCHEMA.TABLES t ON s.TABLE_SCHEMA = t.TABLE_SCHEMA AND s.TABLE_NAME = t.TABLE_NAME INNER JOIN (SELECT TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, MAX(SEQ_IN_INDEX) AS max_columns FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA != 'mysql' GROUP BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME) AS s2 ON s.TABLE_SCHEMA = s2.TABLE_SCHEMA AND s.TABLE_NAME = s2.TABLE_NAME AND s.INDEX_NAME = s2.INDEX_NAME WHERE t.TABLE_SCHEMA != 'mysql' /* Filter out the mysql system DB */ AND t.TABLE_ROWS > 10 /* Only tables with some rows */ AND s.CARDINALITY IS NOT NULL /* Need at least one non-NULL value in the field */ AND ( s.CARDINALITY / IFNULL(t.TABLE_ROWS, 0.01) ) < 1.00 /* Selectivity < 1.0 b/c unique indexes are perfect anyway */ ORDER BY `sel %`, s.TABLE_SCHEMA, s.TABLE_NAME /* Switch to `Sel %` DESC for best non-unique indexes */ LIMIT 10 ; 222T 0604800 .all2-c/* Requirement : MySQL v5.0+ This query will return Number of tables w.r.t. Data_Type */ SELECT DATA_TYPE AS `Data_Type`, COUNT(1) AS `Number` FROM information_schema.COLUMNS WHERE TABLE_SCHEMA NOT IN ('information_schema', 'mysql','performance_schema') GROUP BY `Data_Type` ORDER BY `Number` /Data_Type ]PB9. 8300 V( :all  _ Total ` 604800 [ 0^ /* Requirement : MySQL Cluster v7.1.3 This query will return number of not running nodes , returns 0 incase of all nodes are running*/ SELECT @total := (SELECT VARIABLE_VALUE FROM information_schema.`GLOBAL_STATUS` WHERE VARIABLE_NAME = 'NDB_NUMBER_OF_DATA_NODES') AS `Total`, @running := (SELECT VARIABLE_VALUE FROM information_schema.`GLOBAL_STATUS` WHERE VARIABLE_NAME = 'NDB_NUMBER_OF_READY_DATA_NODES') AS `Running`, @total - @running AS `Nodes_Not_Running` ; \ 300 ] all Z 604800 Y Used Lhpx (08@HPxph`X`XPH@80( xph`XPH@80( ~}{|zyxwvuts r q o p n m ` _ ] ^ \ [ Z Y W X V U T S Q R P O B A @     +*)('&%870/.-, ? > =<;:9 Fypg^ULC:1( }tkbYPG>5,#' % :%%$ $ $$ $#"! ~}{|zyxwvuts r  xjaUI:0 x604800/0 604800 all 3000 ~604800};TABLE_SCHEMA,TABLE_NAMEG| /* Requirement : Percona based MySQL server v5.5+ and userstat=ON This query returns top 5 active tables based on rows read and rows changed */ SELECT TABLE_SCHEMA, TABLE_NAME, ROWS_READ, ROWS_CHANGED, ROWS_CHANGED_X_INDEXES FROM INFORMATION_SCHEMA.TABLE_STATISTICS ORDER BY ROWS_CHANGED DESC LIMIT 5 ; {all z300y0  604800! 300 all9  $300#0 "604800 !user allaA/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the users hitting the server based on total file IO */ SELECT user FROM sys.`x$user_summary` ORDER BY file_ios DESC LIMIT 5; 3000 604800 user allcE/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the users hitting the server with more tablescans */ SELECT `user` FROM sys.`x$user_summary` ORDER BY table_scans DESC LIMIT 5; 3000 604800 host allaA/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the hosts hitting the server based on total file IO */ SELECT host FROM sys.`x$host_summary` ORDER BY file_ios DESC LIMIT 5; 6xl[LB6 630050 4604800*3Uobject_schema,object_name,index_name 2allR1#/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the name of the index that has not been used in a table */ SELECT * FROM sys.`schema_unused_indexes` limit 5; 0300/0 .604800 -user ,all+ /*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the users based on the total number of statements executed by them */ SELECT * FROM sys.`x$user_summary_by_statement_latency` ORDER BY total_latency DESC LIMIT 5; *300)0 (604800';table_schema,table_name &allv%k/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the table that are accessed the most */ SELECT table_schema,table_name FROM sys.`x$schema_table_statistics` ORDER BY io_read_latency DESC LIMIT 5; 2, 2s==y/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the tables that store the most pages in the InnoDB Buffer pool when a page’s content is requested by a query */ SELECT object_schema,object_name FROM sys.`x$innodb_buffer_stats_by_table` ORDER BY pages DESC LIMIT 5; B300A0 @604800??object_schema,object_name >all <300;0 :60480029etable_schema,table_name,redundant_index_name 8allP7/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the name of the index that duplicate other indexes */ SELECT * FROM sys.`schema_redundant_indexes` LIMIT 5; ;qbC9/%XJ; [% DOUBLE Z%GAUGE9Ys%cloudsql.googleapis.com/database/memory/utilizationX$ 1 W$ DOUBLE V$GAUGE6Um$cloudsql.googleapis.com/database/cpu/utilizationT $1S#0R"0Q!0P 1O1N1M1L5/* Requirement : MySQL v5.5+ This query will return various performance_schema metrics */ SELECT EVENT_NAME, MAX_TIMER_READ, AVG_TIMER_READ, MAX_TIMER_WRITE, AVG_TIMER_WRITE, MAX_TIMER_MISC, AVG_TIMER_MISC FROM performance_schema.file_summary_by_event_name; K604800J!EVENT_NAME Iall H300G0 F604800E?object_schema,object_name DallC1/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the table that performs a full table scan upon a query execution */ SELECT * FROM sys.`x$schema_tables_with_full_table_scans` ORDER BY rows_full_scanned DESC,latency DESC LIMIT 5; xo/* Requirement: MySQL V5.0+ This query will return number of non-innodb tables */ SELECT COUNT(*) as count FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE != 'InnoDB' AND TABLE_SCHEMA NOT IN ('mysql','performance_schema', 'information_schema');/ count count [ 5/* Requirement : MySQL v5.0+ This query will return number of tables without a Primary Key/Unique Key */ SELECT COUNT(1) AS COUNT FROM INFORMATION_SCHEMA.TABLES A LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS B ON A.TABLE_NAME=B.TABLE_NAME AND A.TABLE_SCHEMA =B.TABLE_SCHEMA WHERE A.TABLE_SCHEMA NOT IN ('MYSQL','INFORMATION_SCHEMA','PERFORMANCE_SCHEMA') AND B.TABLE_NAME IS NULL AND B.TABLE_SCHEMA is NULL AND A.TABLE_TYPE LIKE 'BASE TABLE' 3000 604800 host alla A/*Requirement: MySQL 5.7+ or MySQL 5.6+ with sys schema being installed. This query returns the hosts hitting the server with more tablescans */ SELECT host FROM sys.`x$host_summary` ORDER BY table_scans DESC LIMIT 5; 300 0 PB9.70 NNPB9../9]/* Requirement : MySQL v5.0+ This query will return the ratio of number of tables having primary key against total number of tables */ SELECT @tblWithoutPk := (SELECT COUNT(*) FROM information_schema.`TABLES` AS t LEFT JOIN information_schema.`KEY_COLUMN_USAGE` AS c ON t.TABLE_NAME = c.TABLE_NAME AND c.CONSTRAINT_SCHEMA = t.TABLE_SCHEMA WHERE t.TABLE_SCHEMA NOT IN ('information_schema', 'mysql','performance_schema') AND constraint_name IS NULL) AS `Tables_Without_PK`, @tblwithPk := (SELECT COUNT(*) FROM information_schema.`TABLES` AS t LEFT JOIN information_schema.`KEY_COLUMN_USAGE` AS c ON t.TABLE_NAME = c.TABLE_NAME AND c.CONSTRAINT_SCHEMA = t.TABLE_SCHEMA WHERE t.TABLE_SCHEMA NOT IN ('information_schema', 'mysql','performance_schema') AND constraint_name = 'PRIMARY') AS `Tables_With_PK`, @tblwithPk / (@tblWithoutPk + @tblwithPk) * 100 AS `Ratio` ; wncXX ;Ratio {pee <604800 s~s Q all P 300O 0 B 604800(AQ Table_Schema,Table_Name,Index_Name @ all?' /* Requirement : Percona based MySQL server v5.5+ This query returns list of unused indexes */ SELECT DISTINCT s.TABLE_SCHEMA AS `Table_Schema`, s.TABLE_NAME AS `Table_Name`, s.INDEX_NAME AS `Index_Name` FROM information_schema.STATISTICS `s` LEFT JOIN information_schema.INDEX_STATISTICS INDXS ON ( s.TABLE_SCHEMA = INDXS.TABLE_SCHEMA AND s.TABLE_NAME = INDXS.TABLE_NAME AND s.INDEX_NAME = INDXS.INDEX_NAME ) WHERE INDXS.TABLE_SCHEMA IS NULL AND s.`TABLE_SCHEMA` != 'mysql' ; > 300= 0 @@RX# /* Requirement : MySQL Cluster v7.1.3 This query will return percentage of free logbuffer size */ SELECT @total := (SELECT SUM(total) FROM ndbinfo.logbuffers) AS `Total`, @used := (SELECT SUM(used) FROM ndbinfo.logbuffers) AS `Used`, ((@total - @used) / @total) * 100 AS `Free_Redo_Buffer`; W all V 300U 0 T 604800S- Used_Data_Memory#RE /* Requirement : MySQL Cluster v7.1.3 This query will return percentage of free data memory */ SELECT @total_data_memory := (SELECT SUM(total) AS `Total_Memory` FROM ndbinfo.memoryusage WHERE memory_type = 'Data memory') AS `Total_Data_Memory`, @used_data_memory := (SELECT SUM(used) Used_Memory FROM ndbinfo.memoryusage WHERE memory_type = 'Data memory') AS `Used_Data_Memory`, ( @total_data_memory - @used_data_memory ) / (@total_data_memory) * 100 AS `Percentage_Of_Free_Data_Memory` ; u@l7@B T suu3) MFullText_Index016a110b0d6f60723390b02d10730bebX; MHost_Hitting_by_File_io694d8713b3c58fb8eb9c15b0e89b6dc3?A MHost_Hitting_by_Tab; 9 MPercona_Unused_Indexes87977829826c5884ee523f9f03794e426/ MPrimary_Key_Ratio76a85d89a965a235e473ffc32e0de4f8/! MData_Types7943cbe3a3c74a2555ac4fc5d9635959:7 MPercona_Active_Tablesb4069d1e0ef681eb4791edd2d748919e95 MCluster_RedoLogspace09c76efca308102247bc14c5fc424be84 + MUsers_Connected7c3a97d79eba9f3bf58b5c45c1de4a3f2 ' MCluster_Nodes8e50caa4bfcc5343b88f7373c59a57a77 1 MCluster_RedoBuffer27babb07e9b06598271792864472d07f6 / MCluster_Data_Free8b218f99cba4d8ee1d28626cf3589920@9Percona_Unused_Indexes%/Primary_Key_Ratio!Data_Types0# MTables_Size4f56167224b23c2226abcf07c2afcf4c3) MStorage_Enginede85205cef3175e5f7328a057e673e5e2' MDatabase_Sizeb1af8e175799da7ceda38a13541d3542/! MWorstIndex78da41bd9cc5692d055d09a69ce44040- MDiskInfo0f27dd8cffd8de3e89fc63ce1c30e091 ? DUB:vp4 )MFreeableMemory405726ab77b9fbf17527a868dbd8b65f)4#)MDiskQueueDepth568b26e942b70b5f2494bcc0b3d0d74a?MReadIOPS6b8d0d43c4cb52228e09a5aef261eb53/MWriteIOPS716985b835f3b0b5ea3cbc627<; MHost_Hitting_by_File_io694d8713b3c58fb8eb9c15b0e89b6dc3?A MHost_Hitting_by_Tablescansf3d003e0feee028605ae98ae2b4965ba?A MTables_Without_Constraints0daf3874660af854ab6643b3961f037c== MTable_InnoDB_Buffer_Pool08e06affb8e440c523a4e894bee6f66f;9 MSchema_Redundant_Index60d1cdbbc57e0e2cc99dced01b1413cc== MUnused_Indexes_In_Schema1951a0db5f5488fcf32031f1b3b9e6f9>? MUsers_statements_executed1398aa03a57c9813e010a4a8659c2c26== MObject_accessed_the_most48443fdf24f52bc3ac9e38e3cfa90b33== MUsers_Hitting_by_File_io153d67671c53e25dccbbfa06a36f69f4C MUsers_Hitting_b@C MUsers_Hitting_by_Tablescans377033a13a47a01ed1f8a2254df0d81a+MSwapUsagebfc79dbe4cfc7497abf8f65c18<; MNon-InnoDB_Tables_Count407af97e4c935181f7c8a9a07bb33068 z}GxG@5(+MWrite_OPS_Count7ae2bec6b283c7c0d2e6ad44932cb4636&-MDisk_Utilizationc6fed12e406dd1ba4b88492d94decfee8%1MMemory_Utilizationd6625d4a9dc4d7edbe896c50434e79ed*+ Write_OPS_Count+ Read_OPS_C54')MRead_OPS_Counta5be1b2b0afd5ea560c49bbd4d17b2c25$+MCPU_Utilizationbda458a452f6386d598e92b4877e7f4d4#)MDiskQueueDepth568b26e942b70b5f2494bcc0b3d0d74a/"MSwapUsagebfc79dbe4cfc7497abf8f65c181e73676!-MFreeStorageSpacec01d51a8ab9d510f2093ef86a61925744 )MFreeableMemory405726ab77b9fbf17527a868dbd8b65f.MReadIOPS6b8d0d43c4cb52228e09a5aef261eb53/MWriteIOPS716985b835f3b0b5ea3cbc6272e0dde64)MCPUUtilizationdca282e2a7646833447dc36591f43277>? MPerformance_Schema_Eventsc5284c133213d38505095163db9ff109AE MTables_with_full_table_scans56743016a2547a6feaa206e2b8f39e6a >P0"Fl (0k '0j &0i %0 g( INT64 f(DELTA;ew(cloudsql.googleapis.com/database/disk/write_ops_countd' 1 c' INT64 b'DELTA (h( 1:au'cloudsql.googleapis.com/database/disk/read_ops_count _& DOUBLE '`& 1 ^&GAUGE7]o&cloudsql.googleapis.com/database/disk/utilization\% 1 41ypg^ULC:1( IA9~u1lcQZ ( ' & %( ( ((' ' ''& & &&% % %%$ $ $$ $#"!