Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 存储大型文本值的最佳方式是什么?_Database_H2 - Fatal编程技术网

Database 存储大型文本值的最佳方式是什么?

Database 存储大型文本值的最佳方式是什么?,database,h2,Database,H2,我有一个包含大量JSON文本的表,每行大约100KB。所以整个数据库文件可能会增长到15GB,这使得它的速度非常慢,甚至需要永远打开数据库。尽管c_data是一个CLOB列 create table t_data ( id integer auto_increment not null, c_some_column_1 integer, c_some_column_2

我有一个包含大量JSON文本的表,每行大约100KB。所以整个数据库文件可能会增长到15GB,这使得它的速度非常慢,甚至需要永远打开数据库。尽管
c_data
是一个CLOB列

create table t_data (
    id                            integer auto_increment not null,
    c_some_column_1               integer,
    c_some_column_2               integer,
    c_data                        text,
    constraint pk_t_data primary key (id)
);
我做错什么了吗?我是否应该将数据存储在单独的文本文件中,以使数据库尽可能轻量级和快速?有更好的解决方案吗


我使用H2数据库1.4.197。

-否则,H2会在运行期间尝试将整个内容加载到内存中startup@a_horse_with_no_name如文档所述,默认情况下,每个表都是一个缓存表。所以我认为这不会有任何区别。也许你可以选择默认的表type@a_horse_with_no_name每一天,我不这么认为。如何检查此变量设置为哪个值?