14 messages in com.mysql.lists.javaSHOW TABLE STATUS - database administ...
FromSent OnAttachments
Mark Matthews17 Jun 2004 19:29 
Mark Matthews17 Jun 2004 20:02 
Scott D. Spiegler17 Jun 2004 20:07 
Scott D. Spiegler18 Jun 2004 11:35 
Kevin Dougan18 Jun 2004 11:39 
Mark Matthews18 Jun 2004 11:42 
Scott D. Spiegler19 Jun 2004 07:26 
Rikard Froberg19 Jun 2004 08:39 
Scott D. Spiegler19 Jun 2004 09:40 
Steve Forsyth19 Jun 2004 10:10 
Wadhwa, Amit19 Jun 2004 16:59 
Rikard Froberg20 Jun 2004 03:24 
Rhino20 Jun 2004 08:23 
Ralf Hauser23 Jun 2004 02:58 
Subject:SHOW TABLE STATUS - database administration through Java classes - how to best determine when to do an OPTIMIZE TABLE ?
From:Ralf Hauser (ralf@gmx.ch)
Date:06/23/2004 02:58:07 AM
List:com.mysql.lists.java

Hi,

Luca gives some hints in http://lists.mysql.com/java/6522

Unfortunately, I didn't see any method of DatabaseMetaData that would help with SHOW TABLE STATUS and if I do a plain stmt = conn.createStatement(); rsThrowAway = stmt.executeQuery("show table status;"); if (rsThrowAway.next()) { returnString = rsThrowAway.getString(1); log.debug("show table status: " + returnString);} else { log.error("no response for show table status" ); } This getString(1) only returns the name of the very first table. Is there a specific documentation on which row gets into which column for "show status"?

The underlying purpose of this exercise is to find out in a cron-job which tables are candidates for "optimize table" improvements.

Any hints would be highly appreciated!

Ralf