Mysql---View database and table sizeThere are four ways to see the size of the MySQL database in four ways, including the following:The first type: Go in to specify the schema database (information that holds other databases)Use Information_schemaThe second type: Querying data files and index file sizes for all dataSelect Concat (Round (sum (data_length/1024/1024
Querying MySQL table size and index size can be achieved through the tables table in the system library INFORMATION_SCHEMA.Some of the fields used in this table are:Table_schema: Database nameTABLE_NAME: Table nameEngine: the storage engine usedTables_rows: Number of record linesData_length: Table SizeIndex_length: Index size1, you can
function mainly includes the following five parameters: (1) and query_cache_limit: maximum capacity of a single query result set that can be cached. The default value is 1 MB. The query result set that exceeds this parameter is not cached. (2), query_cache_min_res_unit: set the minimum size of memory allocated by Query
clearAllCache (Context context) {deleteDir (co Ntext. getCacheDir (); if (Environment. getExternalStorageState (). equals (Environment. MEDIA_MOUNTED) {deleteDir (context. getExternalCacheDir ();} private static boolean deleteDir (File dir) {if (dir! = Null dir. isDirectory () {String [] children = dir. list (); for (int I = 0; I
When you need to check the cache size in the project, you can use the getT
The CPU cache query tool in Linux and the cpu cache query in linux
In Linux, you can use the following tool to query the CPU cache:
Method 1:
$ Lscpu
L1d cache: 32 K
Method 2:
$ ca
. The default value is 0, which means there is no limit.
Eternal: Sets whether the element is persistent. If it is set to true, the cached element will not expire.
Overflowtodisk: Determines whether to transfer data to the disk when the memory is full.
II. The following are optional attributes:
Timetoidleseconds: Sets the time when the element is idle before it expires. It is only valid for non-persistent cache objects. The default value is 0, and
getFormatSize (cacheSize);} public static void clearAllCache (Context context) {deleteDir (co Ntext. getCacheDir (); if (Environment. getExternalStorageState (). equals (Environment. MEDIA_MOUNTED) {deleteDir (context. getExternalCacheDir ();} private static boolean deleteDir (File dir) {if (dir! = Null dir. isDirectory () {String [] children = dir. list (); for (int I = 0; I
When you need to check the cache si
context) {deleteDir (co Ntext. getCacheDir (); if (Environment. getExternalStorageState (). equals (Environment. MEDIA_MOUNTED) {deleteDir (context. getExternalCacheDir ();} private static boolean deleteDir (File dir) {if (dir! = Null dir. isDirectory () {String [] children = dir. list (); for (int I = 0; I
When you need to check the cache size in the project, you can use the getTotalCacheSize (Context)
do not use the MyISAM table, but the internal temporary disk table is a MyISAM table. You can use the check status value 'created _ tmp_disk_tables 'to learn the details.Innodb_buffer_pool_size:InnoDB uses this parameter to specify the memory size to buffer data and indexes. this is the most influential parameter in the Innodb engine.Innodb_additional_mem_pool_size: memory pool size used by InnoDB to store
Collection Level Two cache:When you do not use a two-level cache for a collection:Run the following code:@Test Public voidtestCollectionSecondLevelCache1 () {Department Dept= (Department) session.get (Department.class, 3); System.out.println (Dept.getid ()+" "+dept.getname ()); System.out.println (Dept.getemps (). Size ()); Transaction.commit (); Session.close (); Ses
where table_schema = ' Jishi '; +------------------+ | Total Index Size | +------------------+ | 0.94 MB | +------------------+ 1 row in Set (0.01 sec) View the index size of the specified table for the specified library mysql> SELECT CONCAT (ROUND (SUM (index_length)/ (1024*1024), 2), ' MB ') as ' total Index Size
Label:Transferred from: http://blog.chinaunix.net/uid-16844903-id-321156.html Test environment MySQL 5.5 Innodb_version 1.1.6 MySQL query cache is used to cache and query related data. Specifically,
the cache.Type: Specifies the full class name of the custom cache. Implement the Cache interface.The 3.pojo needs to implement a sequence-swapping interface.and cache-related Configuration/properties:1.cacheenabled: If False, turn off level two cache without shutting down the first level
committed, related queries of this table cannot be cached.
Cache memory management
The cache will open up a piece of memory (query_cache_size) in the memory to maintain the cache data. About 40 kb of space is used to maintain the cache metadata, such as the Space Memory, ing between data tables and
the internal temporary disk table is a MyISAM table. You can use the check status value 'created _ tmp_disk_tables 'to learn the details.
Innodb_buffer_pool_size:InnoDB uses this parameter to specify the memory size to buffer data and indexes. This is the most influential parameter in the Innodb engine.
Innodb_additional_mem_pool_size: memory pool size used by InnoDB to store data dictionaries and other in
internal temporary disk table is a MyISAM table. You can use the check status value 'created _ tmp_disk_tables 'to learn the details.Innodb_buffer_pool_size:InnoDB uses this parameter to specify the memory size to buffer data and indexes. This is the most influential parameter in the Innodb engine.Innodb_additional_mem_pool_size: memory pool size used by InnoDB to store data dictionaries and other internal
Original: https://dev.mysql.com/doc/refman/5.5/en/query-cache-configuration.html
System variable Have_query_cache identifies whether the cache is available:
Mysql> show VARIABLES like ' Have_query_cache ';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| have_query_cache | YES
temporary disk table is the MyISAM table, and you also use this value. You can use the Check status value ' Created_tmp_disk_tables ' for details.
innodb_buffer_pool_size:InnoDB uses this parameter to specify the size of memory to buffer the data and index, which is the most performance-affecting parameter in the InnoDB engine.
Innodb_additional_mem_pool_size: Specifies the size of the memory pool that
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.