数据库索引本质上是一种数据结构(存储结构+算法),目的是为了加快数据检索速度。 1、索引的类型(待完善) 主键索引:给表设置主键,这个表就拥有主键索引。 唯一索引:unique 普通索引:增加某个字段的索引,比如用户表根据用户名查询。 组合索引:使用多个字段创建索引,遵循最左原则,比如创建索引(co ...
分类:
数据库 时间:
2019-10-13 19:01:23
阅读次数:
134
1. 查看主库的参数设置: SQL> show parameter log_archive_dest_2 NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ l... ...
分类:
数据库 时间:
2019-10-13 17:13:20
阅读次数:
132
表完整性约束 作用,用于保证数据的完整性和一致性 |约束条件|说明| | | | |primary key|标识该字段为该表的主键,可以唯一的标识记录,不可以为空| |foreing key|标识该字段为表的外键,实现表与表之间的关联| |not null|标识该字段不能为空| |unique ke ...
分类:
其他好文 时间:
2019-10-12 13:33:38
阅读次数:
123
(1)使用ALTER TABLE语句创建索引。语法如下:alter table table_name add index index_name (column_list) ; #普通索引alter table table_name add unique (column_list) ; #唯一索引al ...
分类:
其他好文 时间:
2019-10-12 01:50:46
阅读次数:
115
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s ...
分类:
其他好文 时间:
2019-10-11 10:31:45
阅读次数:
91
建虚点,点权看作是从虚点连向实点的边权. 对整个图和虚点跑最小生成树即可. ...
分类:
其他好文 时间:
2019-10-10 20:45:49
阅读次数:
107
PV、UV、VV、IP的区别 PV即Page View,网站浏览量 UV即Unique Visitor。独立访客数 VV即Visit View,访客的访问次数 IP即Internet Protocol,独立IP数 ...
分类:
其他好文 时间:
2019-10-10 16:04:31
阅读次数:
120
1、UUID 的概念UUID(Universally Unique Identifier):通用唯一识别码,是一种软件建构的标准。 UUID 目的是让分布式系统中的所有元素,都能有唯一的辨识信息,而不需要通过中央控制端来做辨识信息的指定。 UUID是指在一台机器上生成的数字,它保证对在同一时空中的所 ...
分类:
其他好文 时间:
2019-10-10 14:13:56
阅读次数:
526
class UserProfile(auth.AbstractBaseUser, auth.PermissionsMixin): email = models.EmailField( verbose_name='email address', max_length=255, unique=True,... ...
分类:
其他好文 时间:
2019-10-10 10:43:38
阅读次数:
87
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/first-unique-character-in-a-string/ Given a string, find the first ...
分类:
其他好文 时间:
2019-10-10 10:39:39
阅读次数:
78