索引在MySQL中也叫“键(key)”,索引对性能影响非常关键,当数据量越来越大时,恰当的索引能大幅提高性能,反之,不恰当的索引会降低性能。索引是存储引擎层的而不是服务器层的,不同存储引擎下的索引有不同的工作方式。 1、索引的分类(Index Type) 主键索引 NORMAL普通索引 UNIQUE ...
分类:
数据库 时间:
2020-05-02 13:22:40
阅读次数:
84
动态SQL if EmpMapper接口 EmpMapper.xml where 有时候查询语句不一定会有where此时使用标签智能添加where choose 如果上面的查询只需要选择其中一个条件来执行,而不是所有满足条件的则可以使用标签 set set标签与where标签类似,它能智能的为upd ...
分类:
数据库 时间:
2020-05-02 12:13:50
阅读次数:
62
ps aux |grep mysql 查找到进程编号,使用sudo kill ****关闭进程 ##启动MySQL服务sudo /usr/local/MySQL/support-files/mysql.server start ##停止MySQL服务sudo /usr/local/mysql/sup ...
分类:
数据库 时间:
2020-05-02 12:11:03
阅读次数:
98
MYSQL *my; //①初始化MYSQL my=mysql_init(NULL); char ip[]="127.0.0.1"; char user[]="root"; char pass[]="123"; char database[]="testx"; int port = 3306; // ...
分类:
数据库 时间:
2020-05-02 12:03:08
阅读次数:
86
解析模板[图标时出错favicon.ico]模板可能不存在 在Thymeleaf模板添加link标签 <link rel="shortcuticon"href="../resources/favicon.ico"th:href="@{/static/favicon.ico}"> th:href="@ ...
分类:
数据库 时间:
2020-05-02 11:55:55
阅读次数:
768
在SQLServer数据库当中,除了大家熟知的基于SSMS来管理SQLserver数据库之外,还有一个很强大的命令行工具sqlcmd。该命令行工具基本等同于Oracle SQL*Plus以及 MySQL命令提示符下以实现相关的运维管理工作。尤其是需要多个脚本执行的时候,sqlcmd便派上用场了。本文 ...
分类:
数据库 时间:
2020-05-02 11:42:06
阅读次数:
74
1 package com.spark_sql 2 3 import java.util.Properties 4 import org.apache.spark.sql.{DataFrame, SparkSession} 5 6 object DataFromMysql { 7 def main( ...
分类:
数据库 时间:
2020-05-02 11:31:58
阅读次数:
63
db.getCollection('syxw').find({'click':{$type:2}}).forEach(function(x){x.click=NumberInt(x.click);db.getCollection('syxw').save(x);}) use sxmu 再执行,将sy ...
分类:
数据库 时间:
2020-05-02 11:30:10
阅读次数:
135
启动过程中遇到这个报错 我的是centos7系统.使用的yum装的PG,从网上找了好久,没有找到有用的东西.终于自己研究出来了 分享出来给大家避坑 修改配置文件/var/lib/pgsql/11/data/pg_hba.conf中的这两个地方 修改为 问题就解决了 觉得很有用的一段话 ...
分类:
数据库 时间:
2020-05-02 11:25:52
阅读次数:
84
use mysql mysql> select host, user from user; 将相应用户数据表中的host字段改成'%'; update user set host='%' where user='root'; ERROR 1062 (23000): Duplicate entry ' ...
分类:
数据库 时间:
2020-05-02 10:14:32
阅读次数:
75
Spring + JdbcTemplate + JdbcDaoSupport examples In Spring JDBC development, you can use JdbcTemplate and JdbcDaoSupport classes to simplify the overal ...
分类:
数据库 时间:
2020-05-02 10:01:20
阅读次数:
67
1、基于python安装pip[root@mysql~]#yum-yinstallpython-pippython-devel[root@mysql~]#crulhttps://bootstrap.pypa.io/get-pip.py-oget-pip.py[root@mysql~]#pythonget-pip.py#使用此命令出现黄字或类似字样出现不要担心,不是报错,只是警告您现在Python版
分类:
数据库 时间:
2020-05-02 09:47:49
阅读次数:
88
In this tutorial, we will extend last Maven + Spring hello world example by adding JDBC support, to use Spring + JDBC to insert a record into a custom ...
分类:
数据库 时间:
2020-05-02 09:43:18
阅读次数:
61
#! /bin/bash #download url file_name file_dir define download_url=https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.18.tgz file_name=${downloa ...
分类:
数据库 时间:
2020-05-02 09:24:48
阅读次数:
65
1构建MySQL服务器1.1问题本案例要求熟悉MySQL官方安装包的使用,快速构建一台数据库服务器:安装MySQL-server、MySQl-client软件包修改数据库用户root的密码确认MySQL服务程序运行、root可控1.2方案本课程将使用64位的RHEL7操作系统,MySQL数据库的版本是5.7.17。访问http://dev.mysql.com/downloads/mysql/,找到
分类:
数据库 时间:
2020-05-02 09:21:28
阅读次数:
73
索引是什么 索引帮助mysql高效获取数据的数据结构,存储到磁盘,索引的文件存储形式与存储引擎相关。存储引擎:不同的表数据文件,在磁盘里以不同的组织形式存在,常见存储引擎有Innodb、MyISAM、memory 区别为: Innodb数据跟索引放在一个文件中,而MyISAM分为不同的的文件 Inn ...
分类:
数据库 时间:
2020-05-02 00:30:58
阅读次数:
83