SELECT DISTINCTROW `TABLESPACE_NAME` , `FILE_NAME` , `LOGFILE_GROUP_NAME` , EXTENT_SIZE , INITIAL_SIZE , ENGINE FROM `INFORMATION_SCHEMA` . `FILES` WHERE `FILE_TYPE` = ? AND `TABLESPACE_NAME` IN ( SELECT DISTINCTROW `TABLESPACE_NAME` FROM `INFORMATION_SCHEMA` . `PARTITIONS` WHERE `TABLE_SCHEMA` IN (?) ) ORDER BY `TABLESPACE_NAME` , `LOGFILE_GROUP_NAME` 