处理上百万条的数据库如何提高处理查询速度.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t wher ...
分类:
数据库 时间:
2016-12-01 04:05:53
阅读次数:
261
到今天为止,mysql基础篇就告一段落了,基本的操作都系统的学了一遍。 MYSQL: 什么是msql,数据库的分类,关系模型,数据库的组成,sql简介,mysql简介,MYSQL登录 基本sql操作: 操作数据库:查看数据库,创建数据库,删除数据库,选择数据库。 数据表的操作:查看存在的数据表,创建 ...
分类:
数据库 时间:
2016-12-01 04:03:30
阅读次数:
244
问题:host 'XXX.XXX.XXX.XXX'is not allowed to connect to this MySQL server 解决办法: 如果没有‘%’需要添加 如果有则直接 ...
分类:
数据库 时间:
2016-12-01 04:00:15
阅读次数:
221
连接查询 交叉连接语法: select * | 字段列表 from 表1 cross join 表2 内连接: select *|字段列表 from 左表 inner join 右表 on 左表.字段 = 右表.字段; (inner可以省略) 左外连接(左连接) select *|字段列表 from ...
分类:
数据库 时间:
2016-12-01 04:01:11
阅读次数:
222
若要导入到特定的表空间则需要新建表空间,若不要求,则用已有的,则只需执行下面的步骤 在dos窗口中输入imp 用户名/密码@ip地址:端口号/数据库实例 file='需要导入的dmp文件的路径' full = y(可能需要) 下面是建立表空间和用户的步骤: 用户 建立:create user 用户名 ...
分类:
数据库 时间:
2016-12-01 03:49:35
阅读次数:
259
MongoDB BSON provides support for additional data types than JSON. Drivers provide native support for these data types in host languages and the mongo ...
分类:
数据库 时间:
2016-12-01 03:44:11
阅读次数:
274
一、列属性 所谓的列属性,就是在定义一个列(字段)的时候对该列设置的额外的信息或约束! null和not null 默认情况下,字段都允许为空(缺省值为null),如果加上not null,意思就是这个字段不能为空,所以,not null也叫作非空约束! 当我们没有给一个not null属性的字段插 ...
分类:
数据库 时间:
2016-12-01 03:42:25
阅读次数:
286
Customize the Prompt You may modify the content of the prompt by setting the variable prompt in the mongo shell. The promptvariable can hold strings a ...
分类:
数据库 时间:
2016-12-01 03:40:49
阅读次数:
279
Introduction The mongo shell is an interactive JavaScript interface to MongoDB. You can use the mongo shell to query and update data as well as perfor ...
分类:
数据库 时间:
2016-12-01 03:38:35
阅读次数:
342
In addition to the documentation in the MongoDB Manual, the mongo shell provides some additional information in its “online” help system. This documen ...
分类:
数据库 时间:
2016-12-01 03:36:38
阅读次数:
157
在win7下安装了Python后,想安装python-MySQL,使用pip安装出现如下问题: >pip install MySQL-python _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': ...
分类:
数据库 时间:
2016-12-01 03:28:04
阅读次数:
199
You can write scripts for the mongo shell in JavaScript that manipulate data in MongoDB or perform administrative operation. For more information abou ...
分类:
数据库 时间:
2016-12-01 03:27:12
阅读次数:
305
方法一:1.将数据文件的状态offline 2.操作系统层面完成真正mv改名操作 3.数据库层面修改数据文件名 >告诉数据库 4.把更改完之后的文件置为Online对外提供服务表空间->online 方法二:(适用所有数据文件,但是系统文件只能用这种方式)1、shutdown 关库 2.操作系统层面 ...
分类:
数据库 时间:
2016-12-01 03:25:55
阅读次数:
222
一、连接查询 1、交叉连接 就是从一张表的一条记录去连接另一张表中的所有记录,并且保存所有的记录,其中包括两个表的所有的字段! 从结果上看,就是对两张表做笛卡尔积! 笛卡尔积也就是两个表中所有可能的连接结果!如果第一张表有n1条记录,第二张表有n2条记录,那么笛卡尔积的结果有n1*n2条记录! 交叉 ...
分类:
数据库 时间:
2016-12-01 03:15:09
阅读次数:
343
需要修改你所安装的数据的路径下 tnsnames.ora 文件(我安装路径是F:\app\Aside\product\11.2.0\dbhome_1\NETWORK\ADMIN) tnsnames.ora中的内容如下所示: # tnsnames.ora Network Configuration F ...
分类:
数据库 时间:
2016-12-01 03:11:30
阅读次数:
176