On Tue, 3 May 2011 13:57:11 +0200, Crack <[email protected]> wrote: > I am Google Summer of Code student working on adding Drizzle support > to phpMyAdmin (and, of course, working under phpMyAdmin). I started to > look into differences to MySQL I would like to ask for some help in > figuring out some information placement.
Excellent! > 1. Most of data from information_schema.tables is in > DATA_DICTIONARY.TABLES, but not all. I would like to know whether I > can get values (or their estimates) of: TABLE_ROWS, AVG_ROW_LENGTH, > DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, CHECKSUM, > CREATE_OPTIONS. We seem to be missing this information in an I_S or D_D table that's exposed to the user :) It's in SHOW TABLE STATUS output.... and indeed if you SELECT * FROM DATA_DICTIONARY.SHOW_TABLE_STATUS you get 0 rows returned :) and amazingly enough, can't query it either, just through SHOW TABLE STATUS. I certainly wouldn't mind if we fixed this and indeed had a TABLE_STATS table that could be used. An advantage of I_S queries is that the Drizzle I_S is standards compliant, so queries against it are portable (to other standards compliant systems :) > At least some estimation of table sizes (in bytes) would be useful. As > for row counts, I found INNODB_SYS_TABLESTATS.NUM_ROWS (how accurate > is it?), but I'm wondering whether there is a more generic way to > access this information instead of looking into each storage plugin's > tables. It'll be the estimate that InnoDB maintains... so probably won't be too bad. A SELECT COUNT() can be *really* expensive on INNODB, so you wouldn't want to do that. As for size on disk, you want data and index size, not just avg row length * rows (data only). So probably want to grab those stats from innodb too. > 2. Is there any documentation on InnoDB tables in data_dictionary? > MySQL docs are incomplete and seem too unreliable with all these > question marks in descriptions. Not too much... writing some would be useful :) > 3. I can reconstruct at least some data of SHOW ENGINES by joining > PLUGINS and MODULES tables (plugin name + some description), is there > anything more I can do? That's probably the best way to do it. > I will probably be returning with new questions, I hope you won't get > tired of me ;) never mind good questions from people doing good work. -- Stewart Smith _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

