我需要在Mysql表中保存大约78亿条记录.表是读写密集型的.我必须保持每小时插入率至少0.02亿条记录.虽然在桌面上搜索不应超过10秒.我们有一个UI,用户可以根据不同的colums属性进行搜索.
大多数搜索查询可以像:
select * from mytable where prop1='sip:+100008521149' and
prop2='asdsa'
order by event_timestamp desc limit 10;
select * from mytable where prop1='sip:+100008521149'
order by event_timestamp desc limit 10;
select * from mytable where prop2='asdsa'
order by event_timestamp desc limit 10;
目前桌上有2个索引:
1- idx_1(prop1,event_timestamp)
2- idx_2(prop2,event_timestamp)
Run Code Online (Sandbox Code Playgroud)
InnoDB设置如下:
innodb_buffer_pool_size = 70G
innodb_log_file_size = 4G
innodb_io_capacity=2000
innodb_io_capacity_max=6000
innodb_lru_scan_depth=2000
innodb_flush_log_at_trx_commit=2
innodb_log_buffer_size=16M
innodb_thread_concurrency = 0
innodb_read_io_threads = 64
innodb_write_io_threads = 64
innodb_autoinc_lock_mode = 2
bulk_insert_buffer_size=33554432
query_cache_type=1
query_cache_size=64M
innodb_flush_neighbors=0
expire_logs_days=10
max-connections=500
long_query_time = 5
read_buffer_size=16M
sort_buffer_size=16M …Run Code Online (Sandbox Code Playgroud) 我在 ES 中有两个查询。两者在同一组文档上的周转时间不同。两者在概念上都在做同样的事情。我几乎没有怀疑
1-这两者有什么区别?2- 哪个更好用?3- 如果两者相同,为什么它们的表现不同?
1. Filtered bool
{
"from": 0,
"size": 5,
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"term": {
"called_party_address_number": "1987112602"
}
},
{
"term": {
"original_sender_address_number": "6870340319"
}
},
{
"range": {
"x_event_timestamp": {
"gte": "2016-07-01T00:00:00.000Z",
"lte": "2016-07-30T00:00:00.000Z"
}
}
}
]
}
}
}
},
"sort": [
{
"x_event_timestamp": {
"order": "desc",
"ignore_unmapped": true
}
}
]
}
2. Simple Bool
{
"query": {
"bool": {
"must": [
{
"term": …Run Code Online (Sandbox Code Playgroud) 我在我的jhipster应用程序中创建了一个新角色ROLE_SUPERUSER.我希望只有管理员和我的新用户才能看到特定的导航栏菜单.我尝试使用在authority.directive.js中给出的has-any-authorithy但它不起作用.
我在HTML中使用它
具有-任何-authorithy = "[ 'ROLE_ADMIN', 'ROLE_SUPERUSER']"
我错过了什么吗?
我用的是ignite 2.9。本机持久性已禁用。
使用以下方式启用堆缓存
CacheConfiguration.setOnheapCacheEnabled(true)
但我仍然可以在日志中看到堆外指标。