Teradata JDBC Driver version 22.214.171.124 is rather old. You should upgrade to the most recent version available at http://downloads.teradata.com/download/connectivity/jdbc-driver
We have made some improvements recently to the DatabaseMetaData getColumns method.
Connection parameter USEXVIEWS=ON will slow down your DatabaseMetaData methods. If speed is important to you, then omit connection parameter USEXVIEWS. When you omit USEXVIEWS, then the non-X views are queried, which means that your Teradata Database userid must have select access to the non-X views.
Collecting statistics on Data Dictionary columns and indexes is important for performance. It is recommended that the Teradata Database administrator execute the following SQL commands on a regular basis.
Please refer to the Teradata JDBC Driver Reference for the recommended list of commands.
We have seen this in 13.0 earlier on. But it still exist in 13.1 and 14.0. Mentioned below is time taken by getCol in two different setups.
Development setup - very small database with just a few tables.
Time taken = 2890 msecs
Customer setup - large database with many tables.
Time taken = 26797 msecs
Sometimes this time taken is even more than 2 minutes. We have tried USEXVIEWS=ON, but no luck. Timing is the same.
Is there any other solution to workaround this problem ?