JDBC Driver Parameter Settings for faster performance
Causing JDBC driver delay in reading database metadata or resulset etc. Query execution is fast when we check in database end but getting into app through drive is delaying. Any one help in setting any parameters to get faster response using JDBC Driver. (I'm using vertica-jdk5-6.1.3-0.jar)
0
Comments
Can you provide more detail surrounding your issue? Like the query, result set size, code snippet to show how your application reads the result set? Thanks.
Thank you for your response. I am trying to read metadata of physical table through JDBC. We are using tomcat connection pooling with parameters maxActive="500" maxIdle="20" maxWait="500" for more than 600 users. When we use the following any one of these two code snippet result is very slow (paste the following into some textpad). One more thing i.e which is faster JDBC/ODBC please suggest me then i will try on that also. we observed the issue on concurrency when we do load test for 50 users, 100 users it is giving very poor performance.
Tpye 1:DatabaseMetaData metaData = con.getMetaData();ResultSet rs = metaData.getColumns(con.getCatalog(), null, tableName, null);while (rs.next()){ columnName = rs.getString("COLUMN_NAME").toUpperCase(); columns.add(columnName);}
Type 2:PreparedStatement psmt = con.prepareStatement(viewSql.toString());ResultSetMetaData rsm = psmt.getMetaData();if(null != rsm){ for(int c=0;c<rsm.getColumnCount();c++){ columnName = rsm.getColumnName(c+1).toUpperCase(); columns.add(columnName); }}
-Thanks
2. What is delay between when "statement executed in Java" and "Vertica got query" (start time when java executes a statement and start_time when query started in Vertica)?
3. Do you use in additional frameworks like Spring, Hibernate, dbcp?
4. Is it stateless or stateful implementation? (TomCat so I believe its stateful, but it also depends on web-framework - Wicket, Click).
If it stateless, so may be delay come from servlet initialization?
First we need to understand where delay occurs. You need to profile a path: take time when query sent by client, take time when Vertica got it and backward. From Vertica's DC tables you can know query execution time, IO seeks, CPU load and Network metrics.
>> we observed the issue on concurrency when we do load test for 50 users, 100 users it is giving very poor performance.
Its too hard to answer - bottleneck can be in IO, Network, how data inserted (copy/insert) in the "intermediate java layer" problem.