SELECT id,prom FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 1, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 1, 1) **/ ; SELECT id,prom.time('2024-09-27', '') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 18, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 24, 1) **/ ; SELECT id,prom.date('2024-11-28').find(disk='/opt/matrix*') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 18, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 19, 1) **/; SELECT id,prom.date('2024-11-28').find(name="*key2*") FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 18, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 19, 1) **/; SELECT id,prom.find(name='key2') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 7, 1) **/ ; SELECT id, prom.date('2024-07-27') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecisen1", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecisen2", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 8, 1) **/ ; SELECT id, prom.date('2024-07-28') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecisen1", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecisen2", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 4, 1) **/ ; SELECT id, vtime, prom.date('2024-07-29') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecisen1", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecisen2", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 10, 1) **/ ; SELECT id, prom.date('2024-07-30') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecisen1", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecisen2", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 11, 1) **/ ; SELECT prom.date('2024-07-31') FROM /test/bucketpromdb where id='bucketpromdb:wecise' /** output() matchcount("prom.len", 6, 1) **/ ; SELECT id,prom.time('2024-09-27') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise", "prom.len", 5, 1) **/ ; SELECT id,prom.time('2024-07-26', '').find(name='key2') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 7, 1) **/ ; -- 复杂查找用到了 lucene,得多等一会儿 /** sleep(1s) **/ ; SELECT id,prom.time('2024-07-26', '').find(name='keys2').find(value ~ '.*中文长字.*') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 3, 1) **/ ; SELECT id,prom.time('2024-07-26', '').find(name='keys2').find(value = '这是中文长字符串ssstss') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 3, 1) **/ ; SELECT id,prom.time('2024-07-26', '').find(name='keys1').find(value = 'ssst') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 0, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 3, 1) **/ ; SELECT id,prom.time('2024-07-26', '').find(name='keys2').find(value !~ '.*中文长字a*') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise", "prom", null, 1) **/ ; SELECT id,prom.time('2024-07-26', '').find(name='key1') FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 16, 1) **/ ; -- SELECT id,prom.time('2024-07-26', '').find(name='key1').find(value = 2.9) FROM /test/bucketpromdb -- /** -- output() -- matchcount(id, "bucketpromdb:wecise11", "prom.len", 0, 1) -- matchcount(id, "bucketpromdb:wecise", "prom.len", 1, 1) -- **/ -- ; -- SELECT id,prom.time('2024-07-26', '').find(name='key1').find(value >= 2.9) FROM /test/bucketpromdb -- /** -- output() -- matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) -- matchcount(id, "bucketpromdb:wecise", "prom.len", 7, 1) -- **/ -- ; -- SELECT prom.time('2024-07-26', '').find(name='key1').find(value <= 2.9) FROM /test/bucketpromdb -- /** -- output() -- matchcount(id, "bucketpromdb:wecise11", "prom.len", 4, 1) -- matchcount(id, "bucketpromdb:wecise", "prom.len", 7, 1) -- **/ -- ; select id,prom.time('2024-11-28 11:30', '2024-11-28 11:30').find(name='key1.key2.key4') from /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 1, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 1, 1) **/ ; SELECT class, id, prom.time('2024-01-01', '').find(name ~ "key1.key2.*") FROM /test/bucketpromdb/ /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 18, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 19, 1) **/ ; SELECT id, prom.time('2024-07-24', '').find(name in ["key1"]).find(disk in ["/opt/matrix"]) FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.len", 3, 1) matchcount(id, "bucketpromdb:wecise", "prom.len", 1, 1) **/ ; -- SELECT id, prom_str.date('2024-07-31').find(value ~ 'info') FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value !~ 'info') FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value = '这是string测试') FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value in ['这是string测试']) FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value not like '这是string*') FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value like '这是string*') FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value like '这是string*').facet("info", "hello").groupby(1h) FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-31').find(value like '这是string*').facet("info", "hello").groupby(1h).outlier() FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_str.date('2024-07-27', '2024-07-28', '2024-07-29', '2024-07-30', '2024-07-31').find(value like '这是string*').facet("error").groupby(1h) FROM /test/promdb_string -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-31').time('11:27') FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26','2024-07-27','2024-07-28','2024-07-29','2024-07-30','2024-07-31') FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26','2024-07-27','2024-07-28','2024-07-29','2024-07-30','2024-07-31').avg().groupby(1d) FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26','2024-07-27','2024-07-28','2024-07-29','2024-07-30','2024-07-31').outlier() FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26','2024-07-27','2024-07-28','2024-07-29','2024-07-30','2024-07-31').time('11:').outlier() FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26').unit('avg') FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26','2024-07-27','2024-07-28','2024-07-29','2024-07-30','2024-07-31').sigma("count") FROM /test/bucketsplit -- /** -- output() -- **/ -- ; -- SELECT id, prom_split.date('2024-07-26','2024-07-27','2024-07-28','2024-07-29','2024-07-30','2024-07-31').sigma("count", 1h) FROM /test/bucketsplit -- /** -- output() -- **/ -- ; SELECT id, prom.time('2024-11-28 11:24:00', '2024-11-28 11:25:00').find(name='key1.key2.key3').sum() FROM /test/bucketpromdb where id='bucketpromdb:wecise11' /** output() matchcount(id, "bucketpromdb:wecise11", "prom.0.2", 2, 1) **/ ; SELECT id, prom.date('2024-11-28').avg().sigma() FROM /test/bucketpromdb /** output() matchcount(id, "bucketpromdb:wecise11", "prom.0.2", 2.661111111111112, 1) matchcount(id, "bucketpromdb:wecise", "prom.0.5", 0.15630781478860528, 1) **/ ;