server

sql server中使用组合索引需要注意的地方

做~自己de王妃 提交于 2019-12-03 23:57:43
1、索引应该建在选择性高的字段上(键值唯一的记录数/总记录条数),选择性越高索引的效果越好、价值越大,唯一索引的选择性最高; 2、组合索引中字段的顺序,选择性越高的字段排在最前面;如果把低选择性的列放在最左端,可能会造成无法使用该索引的情况。 3、where条件中包含两个选择性高的字段时,可以考虑分别创建索引,引擎会同时使用两个索引(在OR条件下,应该说必须分开建索引); 4、不要重复创建彼此有包含关系的索引,如index1(a,b,c) 、index2(a,b)、index3(a); 5、组合索引的字段不要过多,如果超过4个字段,一般需要考虑拆分成多个单列索引或更为简单的组合索引; 6、组合索引通常在查询语句中的WHERE条件使用了组合索引最左边的列时会最有用。 7、组合索引增加了更新数据成本,增加了存储索引的成本。另外,在dbms查询时,优化方案中不一定会选择到他(有可能直接选择了单键查询) 8、不要滥用索引。因为过多的索引不仅仅会增加物理存储的开销,对于插入、删除、更新操作也会增加处理上的开销,而且会增加优化器在选择索引时的计算代价。 9、太多的索引与不充分、不正确的索引对性能都是毫无益处的。 10、索引的建立必须慎重,对每个索引的必要性都应该经过仔细分析,要有建立的依据。 参考资料:sql server组合索引 http://www.studyofnet.com/news

Since Android Lollipop 5.0 I am not able to communicate to server (X509TrustManager) via SSL or TLSv1

荒凉一梦 提交于 2019-12-03 23:12:50
I hope someone can help me here. Since Android Lollipop 5.0 I am not able to communicate to server (X509TrustManager) via SSL. It seems like the app is entering in a infinity loop trying to establish handshake. Here is my code: SSLContext sc; SSLSocket sslsock; Socket sock; // Constructor RfbProto(String h, int p) throws IOException{ host = h; port = p; TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted(X509Certificate[] certs, String authType){} public

TPS和QPS的区别

天大地大妈咪最大 提交于 2019-12-03 22:51:06
一、TPS:Transactions Per Second(每秒传输的事务处理个数),即服务器每秒处理的事务数。TPS包括一条消息入和一条消息出,加上一次用户数据库访问。(业务TPS = CAPS × 每个呼叫平均TPS) TPS是软件测试结果的测量单位。一个事务是指一个客户机向服务器发送请求然后服务器做出反应的过程。客户机在发送请求时开始计时,收到服务器响应后结束计时,以此来计算使用的时间和完成的事务个数。 一般的,评价系统性能均以每秒钟完成的技术交易的数量来衡量。系统整体处理能力取决于处理能力最低模块的TPS值。 二、QPS:每秒查询率QPS是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准,在因特网上,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。 对应fetches/sec,即每秒的响应请求数,也即是最大吞吐能力。 一.系统吞度量要素: 一个系统的吞度量(承压能力)与request对CPU的消耗、外部接口、IO等等紧密关联。单个reqeust 对CPU消耗越高,外部系统接口、IO影响速度越慢,系统吞吐能力越低,反之越高。 系统吞吐量几个重要参数:QPS(TPS)、并发数、响应时间 QPS(TPS):每秒钟request/事务 数量 并发数: 系统同时处理的request/事务数 响应时间: 一般取平均响应时间 (很多人经常会把并发数和TPS理解混淆)

Unable to connect to the configured development web sever

瘦欲@ 提交于 2019-12-03 21:01:18
How to solve "Unable to connect to the configured development web server on" in vs2015? p.s I've checked the answers of similar questions and it didn't help. This image is from visual studio 2015 where every time i try to view the website in browser this window pops up Ra'ed I've finally solved the problem, it seems that I was missing the right of using the server (or something like that) Any way you can find the solution in this link How to solve “Microsoft Visual Studio (VS)” error “Unable to connect to the configured development Web server” It seems that once higher version of VS installed

Webrtc media over tcp?

只谈情不闲聊 提交于 2019-12-03 20:25:35
问题 I am new to WebRTC. I was learned about the turn server. The below thing is used to configure the turn server works on TCP for a webrtc application. Example turn server configuration in webrtc application :- { url: ‘turn:192.158.29.39:3478?transport=tcp’, credential: ‘JZEOEt2V3Qb0y27GRntt2u2PAYA=’, username: ‘28224511:1379330808′ } The meaning for the ?transport=tcp is it works on TCP protocol like that they said. My question is, The turn server works on TCP means, it is only for establishing

How to set a global variable in python flask? [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-12-03 17:16:16
This question already has answers here : Closed 2 years ago . Are global variables thread safe in flask? How do I share data between requests? (2 answers) I would like to set a global variable and use it as a trigger of various functions. Each user has a separate global variable. This is used to keep track of previous message data and proceed a conversation. The problem is that how can I manage a separate global variable to each user? The app is running once I deployed it in the server. When I attempt to change the global variable, this variable applies to every user, not just that single user

What is the easiest way to run python scripts in a cloud server?

眉间皱痕 提交于 2019-12-03 17:13:00
问题 I have a web crawling python script that takes hours to complete, and is infeasible to run in its entirety on my local machine. Is there a convenient way to deploy this to a simple web server? The script basically downloads webpages into text files. How would this be best accomplished? Thanks! 回答1: Since you said that performance is a problem and you are doing web-scraping, first thing to try is a Scrapy framework - it is a very fast and easy to use web-scraping framework. scrapyd tool would

主流数据库分页查询介绍

末鹿安然 提交于 2019-12-03 14:47:38
1 背景概述 由于在项目中需要在页面上显示数量非常多的数据, 在进行数据库查询时首先会把所有的数据都查询出来,然后在进行显示,这时候分页查询的操作就必不可少了,本文介绍Mysql、Oracle、sql Server 三种数据库进行分页查询的用法。 2 预期读者 数通畅联内部员工 广大计算机爱好者 3 名词解释 分页查询 就是将将过多的结果在有限的界面上分多页来显示,一般将分页查询分为两类:逻辑分页、物理分页。 逻辑分页 是在用户第一次访问时,将数据库的所有记录全部查询出来,添加到一个大集合中,然后存放在session对象,再通过页码计算出当前页需要显示的数据内容,存储到一个小的list的集合中,并将其存储到request对象中,跳转到JSP页面,进行遍历显示。 当用户第二次访问时,只要不关闭浏览器,还会从session中获取数据,来进行显示。因为此种方法是在内存的session对象中进行计算分页显示的,而不是真正的将我们数据库进行分页的,所以叫做逻辑分页。 缺点:如果需要查询的数据量过大,session将耗费大量的内存;因为是在session中获取数据,如果第二次或者更多此的不关闭浏览器访问,会直接访问session,从而不能保证数据是最新的。 优点:统一代码处理方式,较容易跨数据库做迁移。 物理分页 ,使用数据库自身所带的分页机制,例如,Oracle数据库的rownum

currently unable to handle this request HTTP ERROR 500 [closed]

こ雲淡風輕ζ 提交于 2019-12-03 14:14:19
I have transferred my shopping cart files from local to live. The shopping cart which i am using is Interspire . When I load the page, it shows me this error currently unable to handle this request. The domain is http://4living.de/ I hope to discover why it is showing this error. You site is serving a 500 Internal Server Error . This can be caused by a number of things, such as: File Permissions Fatal Code Errors Web Server Issues EDIT As you have highlighted it is a permission issue. You need to ensure that your files are executable by the web server user Please see below article for some

How to design my online Game Server for Unity3d?

我是研究僧i 提交于 2019-12-03 13:08:03
问题 Recently, I have been doing multiplayer game development in unity3d. I have got the pretty good idea of how the Unity's MasterServer works in unity. But now I want to make my own game server from scratch. I researched and got to know that we can use the Google cloud compute and the app engine for making our own matchmaking server and the game host server. But I am totally clueless how do we start doing coding my server. Do we do it using simple http request and json result? Or is there any