myisam - Finding Out Which Tables Are Included in a MySQL Merge Table -
i have couple of mrg_myisam tables merge bunch of other tables in mysql database. figure out programmatically tables included in each merge table.
i know run show create table , parse union=(tbl1, tbl2) part of statement, seems little hacky. there better way?
in ideal world, i'm looking this:
select * ?? merge_table = 'merge_table_1' that return rows each contain name of table that's included in "merge_table_1":
-------------- | table_name | -------------- | tbl1 | -------------- | tbl2 | --------------
i don't think there data in information_schema list members of merge table.
if application has direct access data directory on database server, can read .mrg file merge table. human-readable file lists tables in merge, , other merge table options.
you shouldn't using merge tables anymore. should use mysql's partitioning engine, more flexible. partitioned tables, can query information_schema.partitions table find information on each partition.
in fact, shouldn't using myisam tables either. innodb more scalable, , myisam doesn't support of properties of acid.
Comments
Post a Comment