Hello all, Could anyone please assist me to understand this. I want to understand where the time is going to and whether there is something I can do about it, with the following query when using JDBC;
Here is the table declaration; CREATE TABLE Memberships ("EMAIL CHAR(60) NOT NULL, NAME CHAR(50) NOT NULL, MIDDLEINITIAL CHAR(1) NULL, SURNAME CHAR(50) NOT NULL, NEWSLETTER CHAR(1) NOT NULL, USERNAME CHAR(15) NOT NULL, PASSWORD CHAR(15) NOT NULL, COUNTRY CHAR(50) NOT NULL, PRIMARY KEY (EMAIL)) TYPE=InnoDB" MySQL table memberships has 110080 rows. Here is the select statement I use with JDBC; SELECT * FROM memberships ORDER BY EMAIL Same select statement I use from the MySQL 'commandline'; mysql> select * into outfile 'mysql200000.txt' from memberships order by email limit 200000; My observations; ---------------- A. When running the SQL from the MySQL 'commandline' with above statement this is the response; mysql> select * into outfile 'mysql200000.txt' from memberships order by email l imit 200000; Query OK, 110080 rows affected (1.27 sec) B. When running the exact same select as stated above in a java program using JDBC, from when issuing, ResultSet rs = stmt.executeQuery(query) until the java program gets control back, to create the resultset, takes 23-25 seconds; I ran program several times. Please advise whether this is to be expected, or whether I could alter anything to get comparable results via JDBC as with MySQL 'commandline'? Kind regards Emmanuel --------------------------------------------------------------------- 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