Hi: Thought I'd mention this (using the latest dev J/connect):
A) DatabaseMetaData.getColumns() does not return the last 4 columns (SCOPE_*) but it should according to the API spec B) InnoDB, on their benchmark page, say that inserting 100,000 rows into the DB is about 5 seconds. http://www.innodb.com/bench.html I am finding this to be more like 300-400 seconds. Try this: CREATE TABLE T1 (A INT NOT NULL AUTO_INCREMENT, B INT, PRIMARY KEY(A)) TYPE=INNODB; CREATE TABLE T2 (A INT NOT NULL, B INT, PRIMARY KEY(A)) TYPE=INNODB; Now run the java driver (source shown at the end of this message). This takes a long time. The innodb bench URL mentioned above uses perl DBI has a test driver, the JDBC *should* be as fast if I am not missing anything (but it's not). Once it's finally done, if you now say (from the mysql client): mysql> insert into T2 select * from T1; Query OK, 107825 rows affected (5.23 sec) Records: 107825 Duplicates: 0 Warnings: 0 Note, this takes about 5 seconds, which shows that the slowdown is not at the DB level but at the JDBC driver level (mysql client even sets auto commit to true by default, and it still takes 5 seoonds). So why does the JDBC driver take so long ? I am accessing the mysql machine over a private 100Mbps connection so I don't think it's the network either. Best regards, --j ------------ java driver -------------- import java.sql.*; import java.util.*; import java.io.*; public class insertTiming { /* Change these as appropriate */ static String user="CHANGE_ME"; static String password="CHANGE_ME"; static String url="CHANGE_ME"; public static void main(String[] args) throws Exception { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection(url,user,password); Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); /* Make sure table T1 has been created prior to this SQL command: CREATE TABLE T1 (A INT NOT NULL AUTO_INCREMENT, B INT, PRIMARY KEY(A)) TYPE=INNODB; */ con.setAutoCommit(false); String sql = "INSERT INTO T1 VALUES (null, '1234567890')"; for (int n = 0; n < 100000; n++) { stmt.execute(sql); } con.commit(); } //~main } //~class -------------------------------------- __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php