public class DbSettings extends SettingsBase
Some settings are a last resort and temporary solution to work around a problem in the application or database engine. Also, there are system properties to enable features that are not yet fully tested or that are not backward compatible.
Modifier and Type | Field and Description |
---|---|
boolean |
aliasColumnName
Database setting
ALIAS_COLUMN_NAME (default: false).When enabled, aliased columns (as in SELECT ID AS I FROM TEST) return the alias (I in this case) in ResultSetMetaData.getColumnName() and 'null' in getTableName(). |
int |
analyzeAuto
Database setting
ANALYZE_AUTO (default: 2000).After changing this many rows, ANALYZE is automatically run for a table. |
int |
analyzeSample
Database setting
ANALYZE_SAMPLE (default: 10000).The default sample size when analyzing a table. |
boolean |
databaseToUpper
Database setting
DATABASE_TO_UPPER (default: true).Database short names are converted to uppercase for the DATABASE() function, and in the CATALOG column of all database meta data methods. |
boolean |
dbCloseOnExit
Database setting
DB_CLOSE_ON_EXIT (default: true).Close the database when the virtual machine exits normally, using a shutdown hook. |
boolean |
defaultConnection
Database setting
DEFAULT_CONNECTION (default: false).Whether Java functions can use DriverManager.getConnection("jdbc:default:connection") to
get a database connection. |
String |
defaultEscape
Database setting
DEFAULT_ESCAPE (default: \).The default escape character for LIKE comparisons. |
boolean |
defragAlways
Database setting
DEFRAG_ALWAYS (default: false).Each time the database is closed, it is fully defragmented (SHUTDOWN DEFRAG). |
boolean |
dropRestrict
Database setting
DROP_RESTRICT (default: true).Whether the default action for DROP TABLE and DROP VIEW is RESTRICT. |
boolean |
earlyFilter
Database setting
EARLY_FILTER (default: false).This setting allows table implementations to apply filter conditions early on. |
int |
estimatedFunctionTableRows
Database setting
ESTIMATED_FUNCTION_TABLE_ROWS (default:
1000).The estimated number of rows in a function table (for example, CSVREAD or FTL_SEARCH). |
boolean |
functionsInSchema
Database setting
FUNCTIONS_IN_SCHEMA (default:
true).If set, all functions are stored in a schema. |
int |
largeResultBufferSize
Database setting
LARGE_RESULT_BUFFER_SIZE (default: 4096).Buffer size for large result sets. |
boolean |
largeTransactions
Database setting
LARGE_TRANSACTIONS (default: true).Support very large transactions |
int |
maxCompactCount
Database setting
MAX_COMPACT_COUNT
(default: Integer.MAX_VALUE).The maximum number of pages to move when closing a database. |
int |
maxCompactTime
Database setting
MAX_COMPACT_TIME (default: 200).The maximum time in milliseconds used to compact a database when closing. |
int |
maxMemoryRowsDistinct
Database setting
MAX_MEMORY_ROWS_DISTINCT (default:
10000).The maximum number of rows kept in-memory for SELECT DISTINCT queries. |
int |
maxQueryTimeout
Database setting
MAX_QUERY_TIMEOUT (default: 0).The maximum timeout of a query in milliseconds. |
boolean |
nestedJoins
Database setting
NESTED_JOINS (default: true).Whether nested joins should be supported. |
boolean |
optimizeDistinct
Database setting
OPTIMIZE_DISTINCT (default: true).Improve the performance of simple DISTINCT queries if an index is available for the given column. |
boolean |
optimizeEvaluatableSubqueries
Database setting
OPTIMIZE_EVALUATABLE_SUBQUERIES (default:
true).Optimize subqueries that are not dependent on the outer query. |
boolean |
optimizeInList
Database setting
OPTIMIZE_IN_LIST (default: true).Optimize IN(...) and IN(SELECT ...) comparisons. |
boolean |
optimizeInSelect
Database setting
OPTIMIZE_IN_SELECT (default: true).Optimize IN(SELECT ...) comparisons. |
boolean |
optimizeInsertFromSelect
Database setting
OPTIMIZE_INSERT_FROM_SELECT
(default: true).Insert into table from query directly bypassing temporary disk storage. |
boolean |
optimizeIsNull
Database setting
OPTIMIZE_IS_NULL (default: false).Use an index for condition of the form columnName IS NULL. |
boolean |
optimizeOr
Database setting
OPTIMIZE_OR (default: true).Convert (C=? OR C=?) to (C IN(?, ?)). |
boolean |
optimizeTwoEquals
Database setting
OPTIMIZE_TWO_EQUALS (default: true).Optimize expressions of the form A=B AND B=1. |
boolean |
optimizeUpdate
Database setting
OPTIMIZE_UPDATE (default: true).Speed up inserts, updates, and deletes by not reading all rows from a page unless necessary. |
boolean |
pageStoreInternalCount
Database setting
PAGE_STORE_INTERNAL_COUNT
(default: false).Update the row counts on a node level. |
int |
pageStoreMaxGrowth
Database setting
PAGE_STORE_MAX_GROWTH
(default: 128 * 1024).The maximum number of pages the file grows at any time. |
boolean |
pageStoreTrim
Database setting
PAGE_STORE_TRIM (default: true).Trim the database size when closing. |
int |
queryCacheSize
Database setting
QUERY_CACHE_SIZE (default: 8).The size of the query cache. |
boolean |
recompileAlways
Database setting
RECOMPILE_ALWAYS (default: false).Always recompile prepared statements. |
int |
reconnectCheckDelay
Database setting
RECONNECT_CHECK_DELAY (default: 200).Check the .lock.db file every this many milliseconds to detect that the database was changed. |
boolean |
rowId
Database setting
ROWID (default: true).If set, each table has a pseudo-column _ROWID_. |
boolean |
selectForUpdateMvcc
Database setting
SELECT_FOR_UPDATE_MVCC
(default: true).If set, SELECT .. |
boolean |
shareLinkedConnections
Database setting
SHARE_LINKED_CONNECTIONS
(default: true).Linked connections should be shared, that means connections to the same database should be used for all linked tables that connect to the same database. |
Modifier and Type | Method and Description |
---|---|
static DbSettings |
getInstance(HashMap<String,String> s)
INTERNAL.
|
containsKey, get, get, get, getSettings
public final boolean aliasColumnName
ALIAS_COLUMN_NAME
(default: false).public final int analyzeAuto
ANALYZE_AUTO
(default: 2000).public final int analyzeSample
ANALYZE_SAMPLE
(default: 10000).public final boolean databaseToUpper
DATABASE_TO_UPPER
(default: true).public final boolean dbCloseOnExit
DB_CLOSE_ON_EXIT
(default: true).public boolean defaultConnection
DEFAULT_CONNECTION
(default: false).DriverManager.getConnection("jdbc:default:connection")
to
get a database connection. This feature is disabled by default for
performance reasons. Please note the Oracle JDBC driver will try to
resolve this database URL if it is loaded before the H2 driver.public final String defaultEscape
DEFAULT_ESCAPE
(default: \).public final boolean defragAlways
DEFRAG_ALWAYS
(default: false).public final boolean dropRestrict
DROP_RESTRICT
(default: true).public final boolean earlyFilter
EARLY_FILTER
(default: false).public final int estimatedFunctionTableRows
ESTIMATED_FUNCTION_TABLE_ROWS
(default:
1000).public final boolean functionsInSchema
FUNCTIONS_IN_SCHEMA
(default:
true).public final int largeResultBufferSize
LARGE_RESULT_BUFFER_SIZE
(default: 4096).public final boolean largeTransactions
LARGE_TRANSACTIONS
(default: true).public final int maxCompactCount
MAX_COMPACT_COUNT
(default: Integer.MAX_VALUE).public final int maxCompactTime
MAX_COMPACT_TIME
(default: 200).public final int maxMemoryRowsDistinct
MAX_MEMORY_ROWS_DISTINCT
(default:
10000).public int maxQueryTimeout
MAX_QUERY_TIMEOUT
(default: 0).public final boolean nestedJoins
NESTED_JOINS
(default: true).public final boolean optimizeDistinct
OPTIMIZE_DISTINCT
(default: true).public final boolean optimizeEvaluatableSubqueries
OPTIMIZE_EVALUATABLE_SUBQUERIES
(default:
true).public final boolean optimizeInsertFromSelect
OPTIMIZE_INSERT_FROM_SELECT
(default: true).public final boolean optimizeInList
OPTIMIZE_IN_LIST
(default: true).public final boolean optimizeInSelect
OPTIMIZE_IN_SELECT
(default: true).public final boolean optimizeIsNull
OPTIMIZE_IS_NULL
(default: false).public final boolean optimizeOr
OPTIMIZE_OR
(default: true).public final boolean optimizeTwoEquals
OPTIMIZE_TWO_EQUALS
(default: true).public final boolean optimizeUpdate
OPTIMIZE_UPDATE
(default: true).public final int pageStoreMaxGrowth
PAGE_STORE_MAX_GROWTH
(default: 128 * 1024).public final boolean pageStoreInternalCount
PAGE_STORE_INTERNAL_COUNT
(default: false).public final boolean pageStoreTrim
PAGE_STORE_TRIM
(default: true).public final int queryCacheSize
QUERY_CACHE_SIZE
(default: 8).public final boolean recompileAlways
RECOMPILE_ALWAYS
(default: false).public final int reconnectCheckDelay
RECONNECT_CHECK_DELAY
(default: 200).public final boolean rowId
ROWID
(default: true).public final boolean selectForUpdateMvcc
SELECT_FOR_UPDATE_MVCC
(default: true).public final boolean shareLinkedConnections
SHARE_LINKED_CONNECTIONS
(default: true).public static DbSettings getInstance(HashMap<String,String> s)
s
- the settingsCopyright © 2012 JBoss by Red Hat. All Rights Reserved.