Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 333ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
t

tables

Recently created Least recently created Recently updated Least recently updated

timmy / MySQL 資料庫與表格查詢

Last active 5 hours ago database management monitoring mysql query tables

這組 SQL 指令可查詢資料庫與各表的紀錄數及大小,方便監控與管理資料庫資源。

0 0 0 1
1 SHOW DATABASES;
2
3 USE myapp;
4 SHOW TABLES;
5
6 SELECT TABLE_NAME, TABLE_ROWS
7 FROM INFORMATION_SCHEMA.TABLES
8 WHERE TABLE_SCHEMA = 'myapp';
9
10 SELECT TABLE_NAME,