燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2024-11-20 74e3485e6bae63e73f5d3be8b36c671e30aa389d
ys.sql
@@ -4,6 +4,11 @@
SHOW BINARY LOGS;
RESET MASTER;
create index index_yssh_gcsj_time on yssh_gcsj(time);
drop index index_yssh_gcsj_time on yssh_gcsj;
https://blog.csdn.net/qq_63161848/article/details/141591514
----------------------------------------------------------------------
create table voc_vals (
   id bigint not null primary key comment '主键',
@@ -12,13 +17,19 @@
    val double(25, 10) comment '值',
    create_time datetime comment '值'
);
-- drop table voc_vals;
create index voc_vals_val on voc_vals (val);
create index voc_vals_time on voc_vals (create_time);
----------------------------------------------------------------------
/* select a.*, date_format(create_time, '%Y%m%d%H') "time" from voc_vals a where date_format(create_time, '%Y%m%d%H') = '2023060514';
create table voc_addr (
   id int not null auto_increment primary key comment '主键',
    x int comment 'X',
    y int comment 'Y',
    addr varchar(50) comment '地址'
);
----------------------------------------------------------------------
select a.*, date_format(create_time, '%Y%m%d%H') "time" from voc_vals a where date_format(create_time, '%Y%m%d%H') = '2023060514';
select * from voc_vals where create_time < date_sub(now(), interval 1 year);
select date_sub(now(), interval 1 year) "time" from dual;
select count(*) from voc_vals; */
select * from voc_vals;
select * from voc_addr;