
DataBase
fyifei0558
先后就职于文思海辉,爱立信,京东,从事自动化测试、性能测试以及开发工作
展开
-
MYSQL优化注意点
MySQL:1. avoid full table scan, so please consider to create index on the column of where, orderby2. avoid null value check 应尽量避免在where子句中对字段进行null值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num上设置默认值,确保表中num列没有null值,然后再如下查询selec.原创 2020-09-22 17:05:11 · 138 阅读 · 0 评论 -
sql trace profile笔记
http://technet.microsoft.com/en-us/library/cc293613.aspx Note:the duration is micro-second, not milli-second We can create template viaForstored procedure investigation, we just chec原创 2014-11-25 10:44:13 · 831 阅读 · 0 评论 -
INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'.
I ran into the issue on SQL server.:INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'.I checked all stored procedures: it is "SETQUOTED_IDENT原创 2015-01-07 15:12:54 · 1430 阅读 · 0 评论 -
Are SQL server Jobs Currently Running?
http://www.sqlnotes.info/2012/01/13/are-jobs-currently-running/Are jobs currently running? This question is asked very frequently by DBAs. The simplest answer is to use SSMS, navigate to SQL Ser转载 2015-01-14 17:39:41 · 721 阅读 · 0 评论 -
sp_depends 被检查相关性的数据库对象。对象可以是表、视图、存储过程或触发器 in sql server
sql server http://www.yesky.com/imagesnew/software/tsql/ts_sp_da-di_9qlv.htm原创 2015-01-14 17:52:50 · 2006 阅读 · 0 评论 -
这个可以帮做我们看目前哪些stored procedure在运行,或者挂起
这个可以帮做我们看目前哪些stored procedure在运行,或者挂起SETTRANSACTIONISOLATIONLEVELREADUNCOMMITTED-- What SQL Statements Are Currently Running?SELECT [Spi原创 2014-12-11 18:40:20 · 385 阅读 · 0 评论 -
sqlserver如何查看里面的各个sessions的CPU,memory, disk io.etc.
自带的工具有 :1. Activity monitor2. select "DB instance"-->right click, report-->standard report-->user statistic.3. DMV4. SELECT login_name ,COUNT(session_id) AS session_count FROM sys.dm_exec_sess原创 2014-12-14 13:01:09 · 940 阅读 · 0 评论 -
SQL server blogs from MS (RID lookup)
http://blogs.msdn.com/b/craigfr/archive/2006/06/30/652639.aspx RID lookup原创 2015-04-27 10:31:34 · 644 阅读 · 0 评论 -
SQL optimization:Implicit Conversion will cause index scan instead of index seek.
1. Implicit Conversion will cause index scan instead of index seek. SELECT aFROM dbo.TeletedAS GP WHERE principalId =@tempNote: principalId date type is uniqueidentifier; but the @t原创 2015-05-12 17:51:06 · 451 阅读 · 0 评论 -
Mysql install failed with dependencies error
mysqlhttp://dev.mysql.com/downloads/mysql/#downloads Issue: When I install mysql on my centos 7 with yum, it complain the following error:Solution: Just remove the mariadb-libsvia the原创 2015-12-29 11:37:38 · 1862 阅读 · 0 评论 -
利用Mongodb的复制集搭建高可用分片,Replica Sets + Sharding的搭建过程
http://blog.itpub.net/26230597/viewspace-1098147/参考资料 reference: http://mongodb.blog.51cto.com/1071559/740131 http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/#sharding原创 2016-09-23 15:02:21 · 822 阅读 · 0 评论 -
Cassandra中的各种策略
Cassandra中的各种策略http://dongxicheng.org/nosql/cassandra-strategy/1. 背景介绍Cassandra 使用分布式哈希表(DHT)来确定存储某一个数据对象的节点。在 DHT 里面,负责存储的节点以及数据对象都被分配一个 token。token 只能在一定的范围内取值,比如说如果用 MD5 作为 token 的话转载 2016-11-29 10:14:59 · 411 阅读 · 0 评论 -
cassandra cql
Cassandra Query Language (CQL) v3.4.2Cassandra Query Language (CQL) v3.4.2CQL SyntaxPreambleConventionsIdentifiers and keywordsConstantsCommentsStatementsPrepared StatementData Definit转载 2016-11-29 16:33:15 · 2541 阅读 · 0 评论 -
SQL xml query http://zywsqlserver100.blog.163.com/blog/static/116385209201021035440930/
/*sql xml 入门: --by jinjazz --http://blog.youkuaiyun.com/jinjazz 1、xml: 能认识元素、属性和值 2、xpath: 寻址语言,类似windows目录的查找(没用过dir命令的话就去面壁)转载 2014-10-28 18:53:07 · 877 阅读 · 0 评论 -
SQL server, get all running sessions on the SQL server
select*fromsys.dm_exec_sessionswherehost_nameisnotnullandstatus='running'原创 2014-08-07 09:08:59 · 416 阅读 · 0 评论 -
【NoSQL】NoSQL入门级资料整理(CAP原理、最终一致性)
http://blog.sina.com.cn/s/blog_3fe961ae010139u6.html传统关系型数据库面临的挑战l High Performance——对数据库高并发读写的需求l Huge Storage——对海量数据的高效率存储的需求l High Scalability & High Availablity——对数据库的高可扩展性和高可用转载 2014-03-18 18:16:12 · 627 阅读 · 0 评论 -
SQL: output的用法
Create procedure ordertotal @order_total money outputasbeginselect @order_total = sum(item_price*quantity) from oders where .....end@order_total定义为OUTPUT,因为要从存储过程返回合计值 调用它:原创 2012-08-10 09:13:35 · 712 阅读 · 0 评论 -
SQL: sql's usage
USE Test; ALTER TABLE TestTable ADD col3 int; INSERT INTO TestTable (col1, col2, col3) VALUES (1,1,1); We will get a error information. SQL Server can't reconginize the column, so原创 2012-08-11 18:15:07 · 829 阅读 · 0 评论 -
SQL 的动态执行
DECLARE @SchemaName varchar(128) DECLARE @TableName varchar(128) -- Now, grab the table name that goes with our ID SELECT @SchemaNameSchemaName = SchemaName, @TableNameTableName = TableName FRO原创 2012-08-11 18:41:24 · 300 阅读 · 0 评论 -
读书笔记:SQL SERVER 2008高级编程:批处理和脚本
Chapter 9批处理和脚本脚本里可以包含多个批处理。它们之间用GO分开。But one SQL batch only has one ‘Go’.SQL Batch 是T-SQL 语句集合的逻辑单元。Note: ‘ Go’ is not a T-SQLcommand.GO’s definition:1. 独立成行2. 独立发送批处理到服务器原创 2012-08-12 20:18:44 · 1127 阅读 · 0 评论 -
确保SQL server 服务是“已启动”状态
1. 在运行中输入“services.msc”,然后确定如图: 2.进入到服务面板原创 2013-01-20 12:15:48 · 872 阅读 · 0 评论 -
安装时使用Windows身份认证,如何改为SQL Server身份认证模式
1. 看图: 2. 进入SQL server 2008 3. 进入SQL server 2008, 准备修改: 4.进入属性面板,并且选择“security”,看图 5. 单击“New Query” 6.复制下面的代码到如图所示,然后单击"Execute", use master ALTER LOGIN sa ENABLE原创 2013-01-20 11:51:38 · 3936 阅读 · 0 评论 -
SSIS 组件使用 Foreach Loop Container and Execute SQL Task
http://www.cnblogs.com/zsjtianya/archive/2012/06/24/2559736.html (2)对cnblogs的这篇文章,进行一点补充,第三步写的不够明白.1介绍组件 1).Foreach Loop Container 2).Execute SQL Task2.功能介绍 1).Foreach Loop Contai原创 2013-05-17 11:19:02 · 2278 阅读 · 0 评论 -
SSIS lookup transformation http://www.katieandemil.com/ssis-lookup-transformation-example-sql-server
http://www.katieandemil.com/ssis-lookup-transformation-example-sql-server In this tutorial I will explain and give a simple example of SSIS lookup transformation.Let's start with short explanati转载 2013-05-17 16:58:49 · 1128 阅读 · 0 评论 -
What´s the difference between Error output and “No match Output” in Lookup transformation SSIS
http://stackoverflow.com/questions/13730531/whats-the-difference-between-error-output-and-no-match-output-in-lookup-trans 1down voteacceptedWith the Lookup Transformation in SSI转载 2013-05-22 10:11:17 · 1302 阅读 · 0 评论 -
How to Identify Blocking Problems with SQL Profiler
https://www.simple-talk.com/sql/sql-tools/how-to-identify-blocking-problems-with-sql-profiler/How to Identify Blocking Problems with SQL Profiler13 March 2009by Brad McGeheeMany SQL Server转载 2013-07-12 16:45:31 · 810 阅读 · 0 评论 -
Shrink database
1. change the database mode from full to simple2. start shrink.原创 2013-09-03 16:22:12 · 651 阅读 · 0 评论 -
SQL server Profiler and excution plan usage for CPU usage high analysis
1. 通过profiler去capture several minutes data;2. see which store procedure takes much time (for example, the store procedure take 6.5 seconds)3. via the execution plan to analyze which SQL sentence原创 2013-10-17 15:45:08 · 1248 阅读 · 0 评论 -
Installa MongoDB on Window server 2008(64bit)
Installed on Windows server 2008(64bit), please use 64bitlegacy installation package.the steps is fromhttp://blog.sina.com.cn/s/blog_685213e70101g81t.html安装MongoDB1.按照操作系统下载http://转载 2014-03-17 13:52:21 · 1148 阅读 · 0 评论 -
sql server中的用户临时表和全局临时表的区别
临时表分为:本地临时表,仅限于当前访问者访问,创建方法去如下:create table #TableName(表结构)储存于数据库tempdb内(硬盘),当前用户断开连接,自动删除如果使用中不断开连接,且不需要该临时表请执行:drop table #TableName全局临时表,所有访问用户访问,创建方法去如下:create table ##TableName(表结构)原创 2012-08-06 10:02:20 · 2709 阅读 · 0 评论