I'm playing with different properties listed here, in specific with the ones marked as Performance Extensions. I'm testing with cacheResultSetMetadata, but can't find documentation on what exactly is cached when the property is set to true.
Also, is there any scenario where using it is recommended/not recommended?
First you have to read about ResultSetMetaData that is an object, used to get information about the types and properties of the columns in a
The ResultSet object returned by a SELECT statement also contains column (field) names, lengths and types.
You can use
res.getMetaData() to retrieve them into a ResultSetMetaData object, which offers the following methods to allow to get different information:
getColumnCount() - Returns the number of columns in this ResultSet object. getColumnName(int column) - Get the designated column's name. getColumnTypeName(int column) - Retrieves the designated column's database-specific type name. getPrecision(int column) - Get the designated column's specified column size. getTableName() - Returns the qualifier for the underlying table of the ResultSet getSchemaName() - Returns the the designated column's table's schema name getColumnDisplaySize() - Returns column display length
Whether a column is read-only, nullability, automatically numbered, and so on.
You can also specify property
metadataCacheSize that tells about the number of queries to cache
ResultSetMetadata for if
cacheResultSetMetaData is set to 'true' (default 50)