This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the <code>CREATE LINKED TABLE</code> statement:
This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the <code>CREATE LINKED TABLE</code> statement:
@advanced_1051_p
@advanced_1051_p
You can then access the table in the usual way. Whenever the linked table is accessed, the database issues specific queries over JDBC. Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID=1</code>, then the following query is run against the PostgreSQL database: <code>SELECT * FROM TEST WHERE ID=?</code>. The same happens for insert and update statements. Only simple statements are executed against the target database, that means no joins. Prepared statements are used where possible.
You can then access the table in the usual way. Whenever the linked table is accessed, the database issues specific queries over JDBC. Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID=1</code>, then the following query is run against the PostgreSQL database: <code>SELECT * FROM TEST WHERE ID=?</code>. The same happens for insert and update statements. Only simple statements are executed against the target database, that means no joins (queries that contain joins are converted to simple queries). Prepared statements are used where possible.
@advanced_1052_p
@advanced_1052_p
To view the statements that are executed against the target table, set the trace level to 3.
To view the statements that are executed against the target table, set the trace level to 3.
...
@@ -7439,7 +7439,7 @@ Transactions
...
@@ -7439,7 +7439,7 @@ Transactions
In-Memory Performance and Usage
In-Memory Performance and Usage
@mvstore_1065_p
@mvstore_1065_p
Performance of in-memory operations is comparable with <code>java.util.TreeMap</code>, but usually slower than <code>java.util.HashMap</code>.
Performance of in-memory operations is a bit slower than <code>java.util.TreeMap</code>, and slower than <code>java.util.HashMap</code>.
@mvstore_1066_p
@mvstore_1066_p
The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
# This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the <code>CREATE LINKED TABLE</code> statement:
# This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the <code>CREATE LINKED TABLE</code> statement:
@advanced_1051_p
@advanced_1051_p
# You can then access the table in the usual way. Whenever the linked table is accessed, the database issues specific queries over JDBC. Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID=1</code>, then the following query is run against the PostgreSQL database: <code>SELECT * FROM TEST WHERE ID=?</code>. The same happens for insert and update statements. Only simple statements are executed against the target database, that means no joins. Prepared statements are used where possible.
# You can then access the table in the usual way. Whenever the linked table is accessed, the database issues specific queries over JDBC. Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID=1</code>, then the following query is run against the PostgreSQL database: <code>SELECT * FROM TEST WHERE ID=?</code>. The same happens for insert and update statements. Only simple statements are executed against the target database, that means no joins (queries that contain joins are converted to simple queries). Prepared statements are used where possible.
@advanced_1052_p
@advanced_1052_p
# To view the statements that are executed against the target table, set the trace level to 3.
# To view the statements that are executed against the target table, set the trace level to 3.
...
@@ -7439,7 +7439,7 @@ H2 データベース エンジン
...
@@ -7439,7 +7439,7 @@ H2 データベース エンジン
#In-Memory Performance and Usage
#In-Memory Performance and Usage
@mvstore_1065_p
@mvstore_1065_p
# Performance of in-memory operations is comparable with <code>java.util.TreeMap</code>, but usually slower than <code>java.util.HashMap</code>.
# Performance of in-memory operations is a bit slower than <code>java.util.TreeMap</code>, and slower than <code>java.util.HashMap</code>.
@mvstore_1066_p
@mvstore_1066_p
# The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
# The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
advanced_1048_p=\ CLOB and BLOB values can be compressed by using <a href\="grammar.html\#set_compress_lob"class\="notranslate">SET COMPRESS_LOB</a>. The LZF algorithm is faster but needs more disk space. By default compression is disabled, which usually speeds up write operations. If you store many large compressible values such as XML, HTML, text, and uncompressed binary files, then compressing can save a lot of disk space (sometimes more than 50%), and read operations may even be faster.
advanced_1048_p=\ CLOB and BLOB values can be compressed by using <a href\="grammar.html\#set_compress_lob"class\="notranslate">SET COMPRESS_LOB</a>. The LZF algorithm is faster but needs more disk space. By default compression is disabled, which usually speeds up write operations. If you store many large compressible values such as XML, HTML, text, and uncompressed binary files, then compressing can save a lot of disk space (sometimes more than 50%), and read operations may even be faster.
advanced_1049_h2=Linked Tables
advanced_1049_h2=Linked Tables
advanced_1050_p=\ This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the <code>CREATE LINKED TABLE</code> statement\:
advanced_1050_p=\ This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the <code>CREATE LINKED TABLE</code> statement\:
advanced_1051_p=\ You can then access the table in the usual way. Whenever the linked table is accessed, the database issues specific queries over JDBC. Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID\=1</code>, then the following query is run against the PostgreSQL database\:<code>SELECT * FROM TEST WHERE ID\=?</code>. The same happens for insert and update statements. Only simple statements are executed against the target database, that means no joins. Prepared statements are used where possible.
advanced_1051_p=\ You can then access the table in the usual way. Whenever the linked table is accessed, the database issues specific queries over JDBC. Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID\=1</code>, then the following query is run against the PostgreSQL database\:<code>SELECT * FROM TEST WHERE ID\=?</code>. The same happens for insert and update statements. Only simple statements are executed against the target database, that means no joins (queries that contain joins are converted to simple queries). Prepared statements are used where possible.
advanced_1052_p=\ To view the statements that are executed against the target table, set the trace level to 3.
advanced_1052_p=\ To view the statements that are executed against the target table, set the trace level to 3.
advanced_1053_p=\ If multiple linked tables point to the same database (using the same database URL), the connection is shared. To disable this, set the system property <code>h2.shareLinkedConnections\=false</code>.
advanced_1053_p=\ If multiple linked tables point to the same database (using the same database URL), the connection is shared. To disable this, set the system property <code>h2.shareLinkedConnections\=false</code>.
advanced_1054_p=\ The statement <a href\="grammar.html\#create_linked_table"class\="notranslate">CREATE LINKED TABLE</a> supports an optional schema name parameter.
advanced_1054_p=\ The statement <a href\="grammar.html\#create_linked_table"class\="notranslate">CREATE LINKED TABLE</a> supports an optional schema name parameter.
mvstore_1062_p=\ To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. The tool supports PostgreSQL style "read committed" transaction isolation with savepoints, two-phase commit, and other features typically available in a database. There is no limit on the size of a transaction (the log is written to disk for large or long running transactions).
mvstore_1062_p=\ To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. The tool supports PostgreSQL style "read committed" transaction isolation with savepoints, two-phase commit, and other features typically available in a database. There is no limit on the size of a transaction (the log is written to disk for large or long running transactions).
mvstore_1063_p=\ Internally, this utility stores the old versions of changed entries in a separate map, similar to a transaction log, except that entries of a closed transaction are removed, and the log is usually not stored for short transactions. For common use cases, the storage overhead of this utility is very small compared to the overhead of a regular transaction log.
mvstore_1063_p=\ Internally, this utility stores the old versions of changed entries in a separate map, similar to a transaction log, except that entries of a closed transaction are removed, and the log is usually not stored for short transactions. For common use cases, the storage overhead of this utility is very small compared to the overhead of a regular transaction log.
mvstore_1064_h3=In-Memory Performance and Usage
mvstore_1064_h3=In-Memory Performance and Usage
mvstore_1065_p=\ Performance of in-memory operations is comparable with <code>java.util.TreeMap</code>, but usually slower than <code>java.util.HashMap</code>.
mvstore_1065_p=\ Performance of in-memory operations is a bit slower than <code>java.util.TreeMap</code>, and slower than <code>java.util.HashMap</code>.
mvstore_1066_p=\ The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
mvstore_1066_p=\ The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
mvstore_1067_p=\ If no file name is specified, the store operates purely in memory. Except for persisting data, all features are supported in this mode (multi-versioning, index lookup, R-tree and so on). If a file name is specified, all operations occur in memory (with the same performance characteristics) until data is persisted.
mvstore_1067_p=\ If no file name is specified, the store operates purely in memory. Except for persisting data, all features are supported in this mode (multi-versioning, index lookup, R-tree and so on). If a file name is specified, all operations occur in memory (with the same performance characteristics) until data is persisted.
mvstore_1068_p=\ As in all map implementations, keys need to be immutable, that means changing the key object after an entry has been added is not allowed. If a file name is specified, the value may also not be changed after adding an entry, because it might be serialized (which could happen at any time when autocommit is enabled).
mvstore_1068_p=\ As in all map implementations, keys need to be immutable, that means changing the key object after an entry has been added is not allowed. If a file name is specified, the value may also not be changed after adding an entry, because it might be serialized (which could happen at any time when autocommit is enabled).