-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathappendix_5.2_factorQueryTest.dos
76 lines (73 loc) · 4.07 KB
/
appendix_5.2_factorQueryTest.dos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
login("admin","123456")
// 因子查询
clearAllCache()
olap_min_factor=loadTable("dfs://MIN_FACTOR_OLAP",'min_factor')
print("OLAP:查询1个因子1支股票指定时间点数据")
timer c = select * from olap_min_factor where tradetime=2020.01.02T09:30:00.000 and symbol=`sz000001 and factorcode=`f0001
clearAllCache()
print("OLAP:查询1个因子1只股票一年分钟级数据")
timer c = select * from olap_min_factor where factorcode=`f0001 and symbol=`sz000001
clearAllCache()
print("OLAP:查询1个因子全市场股票一年分钟级数据")
timer c = select * from olap_min_factor where factorcode=`f0001
clearAllCache()
print("OLAP:查询3个因子全市场股票一年分钟级数据")
timer c = select * from olap_min_factor where factorcode in ('f0001','f0002','f0003')
clearAllCache()
print("OLAP:查询一只股票全部因子一年的分钟级数据")
timer c = select * from olap_min_factor where symbol=`sz000001
clearAllCache()
print("OLAP:1个因子全市场股票一年分钟级面板数据")
timer olap_factor_year_pivot = select val from olap_min_factor where factorcode=`f0002 pivot by tradetime,symbol
clearAllCache()
print("OLAP:3个因子全市场股票一年分钟级面板数据") // node down
timer olap_factor_year_pivot = select val from olap_min_factor where factorcode in ('f0001','f0002','f0003') pivot by tradetime,symbol,factorcode
// dropDatabase("dfs://MIN_FACTOR_OLAP")
undef all
clearAllCache()
tsdb_min_factor=loadTable("dfs://MIN_FACTOR_TSDB",'min_factor')
print("TSDB:查询1个因子1支股票指定时间点数据")
timer c = select * from tsdb_min_factor where tradetime=2020.01.01T09:30:00.000 and symbol=`sz000001 and factorcode=`f0001
clearAllCache()
print("TSDB:查询1个因子1只股票一年分钟级数据")
timer c = select * from tsdb_min_factor where factorcode=`f0001 and symbol=`sz000001
clearAllCache()
print("TSDB:查询1个因子全市场股票一年分钟级数据")
timer c = select * from tsdb_min_factor where factorcode=`f0001
clearAllCache()
print("TSDB:查询3个因子全市场股票一年分钟级数据")
timer c = select * from tsdb_min_factor where factorcode in ('f0001','f0002','f0003')
clearAllCache()
print("TSDB:查询一只股票全部因子一年的分钟级数据")
timer c = select * from tsdb_min_factor where symbol=`sz000001
clearAllCache()
print("TSDB:1个因子全市场股票一年分钟级面板数据")
timer tsdb_factor_year_pivot = select val from tsdb_min_factor where factorcode=`f0001 pivot by tradetime,symbol
clearAllCache()
print("TSDB:3个因子全市场股票一年分钟级面板数据")
timer tsdb_factor_year_pivot = select val from tsdb_min_factor where factorcode in ('f0001','f0002','f0003') pivot by tradetime,symbol,factorcode
// dropDatabase("dfs://MIN_FACTOR_TSDB")
undef all
clearAllCache()
tsdb_wide_min_factor=loadTable("dfs://MIN_FACTOR_TSDB_WIDE",'min_factor')
print("TSDB_WIDE:查询1个因子1支股票指定时间点数据")
timer c = select mtime,factorname,sz000050 from tsdb_wide_min_factor where mtime=2020.01.01T09:30:00.000,factorname=`f0001
clearAllCache()
print("TSDB_WIDE:查询1个因子1只股票一年分钟级数据")
timer c = select mtime,factorname,sz003000 from tsdb_wide_min_factor where factorname=`f0001
clearAllCache()
print("TSDB_WIDE:查询1个因子全市场股票一年分钟级数据")
timer c = select * from tsdb_wide_min_factor where factorname=`f0001
clearAllCache()
print("TSDB_WIDE:查询3个因子全市场股票一年分钟级数据")
timer c = select * from tsdb_wide_min_factor where factorname in ('f0001','f0002','f0003')
clearAllCache()
print("TSDB_WIDE:查询一只股票全部因子一年的分钟级数据")
timer c = select mtime,factorname,sz000001 from tsdb_wide_min_factor
clearAllCache()
print("TSDB_WIDE:1个因子全市场股票一年分钟级面板数据")
timer tsdb_factor_year_wide = select * from tsdb_wide_min_factor where factorname=`f0001
clearAllCache()
print("TSDB_WIDE:3个因子全市场股票一年分钟级面板数据")
timer tsdb_factor_year_wide = select * from tsdb_wide_min_factor where factorname in ('f0001','f0002','f0003')
// dropDatabase("dfs://MIN_FACTOR_TSDB_WIDE")