I suspect that you are mistaken about the amount of time being spent in the call to conn.createStatement. That method call typically executes very fast, because it does not communicate with the Teradata Database.
I recommend adding some System.out.println(new Date ()) calls in between your existing lines of code, in order to see what is actually taking time.
I also recommend adding the LOG=TIMING connection parameter to the JDBC connection URL.
Thank for your replying, I have used System.out.println(new Date()) to prove what process get many sec and then getting "stmt = conn.createStatement()" takeing 5 Sec long.
I got the messages below after setting "LOG=TIMING connection parameter to the JDBC connection URL".
Plz help me find out what it really is problem.
2015-03-03.16:02:37.819 TERAJDBC4 TIMING [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@65c3814