对于我们使用monetdb存储相当大量数据的每个人来说,它适用于复杂查询,但在涉及到当前数据时性能不如简单的select语句。这是一个简单的命令RUN,在桌子上有34列,需要58秒。
SELECT * FROM "mydb"."calls" WHERE id > -1 AND id<= 10000;
现在让我们检查下面给出的查询,位修改和测试查询是否存在任何问题,它在317ms内返回响应。
SELECT COUNT(*) FROM (SELECT * FROM "mydb"."calls" WHERE id > -1 AND id<= 10000) cdrs;
任何人都可以建议配置设置来解决此问题吗?
Database: MonetDB v11.20.0 (unreleased)
Database Shell : mclient
Python Lib: monetdb.sql
mserver5 --version
MonetDB 5 server v11.20.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 31.4GiB available memory, 24 available cpu cores
Libraries:
libpcre: 8.36 2014-09-26 (compiled with 8.36)
openssl: OpenSSL 1.0.1m 19 Mar 2015 (compiled with OpenSSL 1.0.1m 19 Mar 2015)
libxml2: 2.9.2 (compiled with 2.9.2)
Compiled by: root@cdrs (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code