浮点数 mysql golang 时间序列 32位浮点 64位浮点 float32 float64 保证一定有一行返回

 3)

保证一定有一行返回

 

SELECT COUNT(*),IF(a.Id IS NULL,0,123) ,a.Id 

 

rows.Scan(&Val,

 

 

2)

mysql

`ThresholdMin` DECIMAL(20,6) NOT NULL DEFAULT '0.000000' COMMENT '阈值下限',
`ThresholdMax` DECIMAL(20,6) NOT NULL DEFAULT '0.000000' COMMENT '阈值上限',

-4294967296.000000

4294967295.000000

取出后

float32

Max: 4294967300

Min: -4294967300

float64

  "Min": -4294967296,
 "Max": 4294967295
 
 
go version go1.19 linux/amd64
 

cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
stepping : 1
microcode : 0xb00002e
cpu MHz : 2097.570
cache size : 20480 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp kaiser fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt arat flush_l1d arch_capabilities
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit
bogomips : 4195.14
clflush size : 64
cache_alignment : 64
address sizes : 43 bits physical, 48 bits virtual
power management:

 

 

1)

1.6607259e+09 1660725877

mysql> SELECT Val,CreateTs,CreateTs FROM Tab WHERE DeviceId=156 AND OID=".1.3.6.1.4.1.28713.1.2.2.0"  AND CreateTs>=1660704714 AND CreateTs<1660791114 ORDER BY CreateTs ASC LIMIT 1;
+--------+------------+------------+
| Val    | CreateTs   | CreateTs   |
+--------+------------+------------+
| 429780 | 1660725877 | 1660725877 |
+--------+------------+------------+
1 row in set (0.04 sec)
 
 
	for rows.Next() {
		var X float32
		var Y string
		var a int32
		err = rows.Scan(&Y, &X, &a)

  

 

 

 1660725945

1660725952

golang 处理后的分界线

 

 

 
 `CreateTs` INT(10) NOT NULL DEFAULT '0' COMMENT '创建时的Unix时间戳',
 
 
posted @ 2022-08-18 11:51  papering  阅读(133)  评论(0编辑  收藏  举报