• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to List Tables Per Tablespace In MySQL Cluster

by admin

Question: How to list tables inside tablespaces in a MuSQL cluster?

The following query meets the aim of the question, lists the database, table name and the corresponding tablespace:

SELECT DISTINCT t.table_schema, t.table_name, p.tablespace_name
FROM partitions p JOIN TABLES t ON (t.table_schema=p.table_schema and t.table_name = p.table_name)
WHERE t.engine='ndbcluster' and tablespace_name IS NOT NULL

Filed Under: mysql, MySQL Cluster

Some more articles you might also be interested in …

  1. MySQL: Identify what user and thread are holding on to a meta data lock that is preventing other queries from running
  2. Excluding a table or database from MySQL replication
  3. How To Skip a Transaction on MySQL replication slave When GTIDs Are Enabled
  4. MySQL Cluster requirements to avoid Single Point of Failure
  5. How to Rollback RPM Upgrade of the MySQL Server
  6. “Another MySQL daemon already running with the same unix socket” – error while starting MYSQL
  7. System Tuning for MySQL Server
  8. MySQL Server Error – “Can’t Create A New Thread (errno 11)”
  9. How To Reset MySQL 8.0 Root Password On Windows
  10. How to use mysqlsh to execute addInstance in silent mode

You May Also Like

Primary Sidebar

Recent Posts

  • What are /dev/zero and /dev/null files in Linux
  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright