Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

MySQL Get Disk Space Allocation of Database

Posted on October 2, 2015 By David Kittell
SELECT table_name AS "Tables"
	,round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
ORDER BY (data_length + index_length) DESC
SELECT table_name AS "Tables"
	,round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "$DBNAME"
ORDER BY (data_length + index_length) DESC
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code MySQL SQL

Post navigation

Previous post
Next post

Related Posts

Enable/Disable Hyper-V

Posted on July 20, 2018

dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All dism.exe /Online /Disable-Feature:Microsoft-Hyper-V All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears…

Read More

Ektron – Find DMS Content File

Posted on November 11, 2013October 26, 2015

Sometimes you’re asked where a DMS file exists on the server and have to track it down, this query should help. Caveat: It helps to know where your root/main asset directory is on your server. SELECT content_id AS "Content: Content ID" ,content_title AS "Content: Content Title" ,(storage + ‘.’ +…

Read More

Bash – Get ARIN IP Information

Posted on July 16, 2021August 17, 2024

A bit crude but works # Prerequisite: brew install ipcalc # Place all the IP Addresses in a text file IPList.txt echo "IP Address|Root Owner|Owner|IP CIDR|IP RDNS" | tee ARIN.txt for ip in $(cat IPList.txt | sort); do arin=$(whois -h whois.arin.net "$ip") rootOwner=$(echo "$arin" | grep ‘Organization’ | cut -d…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes