当前位置:网站首页>Software test interview questions (4)
Software test interview questions (4)
2022-07-29 04:40:00 【TEST_ Chen pangzi】
1、 The difference between compilation errors and running errors
- Compilation errors generally refer to syntax errors or obvious logic errors , Such as : Semicolon missing , Write fewer parentheses , Key words written wrong etc
- A run error is a logical error that results from running without a compile error , Such as : Null pointer exception , Divisor is 0 , Cross border visits, etc
2、 Stored procedure of database
stored procedure (Stored Procedure) It's on a large scale Database system in , A group of SQL Statements set , It's stored in a database , once compile After the permanent effect , The user specifies the name of the stored procedure and gives the parameters ( If the stored procedure has parameters ) To execute it. . Stored procedure is an important object in database . In the case of a huge amount of data, the use of stored procedures can achieve double speed efficiency .
3、 How to optimize the efficiency of database query
MySQL Common database query performance optimization methods
How to optimize the query efficiency of the database
Choice of storage engine : If the data table needs to support transaction processing , We should consider Innodb engine , Because it completely conforms to ACID Characteristics of ; If the data table does not need to support transaction processing , Then use the storage engine MyISAM
- Optimize the query , Try to avoid using full table scanning , The first thing to consider is where as well as order by Build the corresponding index on the column involved in the sentence
- Try to avoid where Clause != perhaps > , < Wait for the operator , Otherwise, the storage engine will give up using indexes , And do a full table scan
- Try to avoid where Clause null Value for judgment , Otherwise, the storage engine will give up using indexes , And do a full table scan
- Try to avoid where Clause or The judgment of the , If a field has an index , A field has no index , It will cause the engine to abandon the use of indexes , And do a full table scan
- The following query will also result in a full table scan :( The leading percent sign cannot be used ) select id from t where name like ‘%abc%’;
- It is clear that not all indexes are valid for queries ,SQL Query optimization is based on the data in the table , When there is a large amount of duplicate data in the index column , Queries may not use indexes , If there are fields in a table sex, When men and women occupy almost half , So even in sex It's indexed on , It also has no effect on query efficiency
- The more indexes, the better , The index can improve the corresponding select The efficiency of , But it also reduces insert and update The efficiency of , because insert and update It's possible to rebuild the index , Cause two queries , So how to build an index needs careful consideration , As the case may be
- Try to use numeric fields , If only contains the numerical value information the field as far as possible does not design for the character type , Set to character type, which will reduce the performance of query and connection , And it increases storage overhead . This is because the engine compares each character in the string one by one when it processes queries and connections , For digital data , Just one comparison is enough
- Should try to avoid in where The clause performs an expression operation on the field , This will cause the engine to abandon indexing , And do a full table scan ( for example : select id from t where num=100*2; )
4、 Database optimization scheme
How to optimize the query efficiency of the database
- When designing tables , Design tables in strict accordance with database design specifications
- Use the cache , Make frequent visits to , And the data that does not need to change frequently is put in the cache , Can reduce the number of disks IO Number of reads and writes , Because disk IO The transmission speed is very slow
- use mysql Self contained table partitioning technology , Divide the data into different files , It can improve the reading and writing efficiency of the disk
- Choose the right engine , Parameter optimization ( It works char(10), You don't have to char(20))
- Do not use full-text search
- Avoid frequent creation and deletion of temporary tables , To reduce the consumption of system table resources
5、 ... and 、B/S The architecture and C/S Definition and difference of architecture ( Difference )
One 、B/S The architecture and C/S Definition of Architecture
1、B/S(Browser-Server) Browser and server architecture . ( For example, Baidu. 、 Microblogging 、 Taobao and other websites )
Including the sender browser 、web application server 、 Database server software system . Users only need a browser to access the service . When the system is updated , Just update the server , No need to update browser .
2、C/S(Client-Server) Client and server architecture .( For example, wechat 、 King glory mobile Tour ,QQ Music and other software ).
C/S Structure and B/S The most significant difference is the need to install the client , Access the application system through the client program . So when the system is updated , Update the server , Also update the client .
Two 、B/S And C/S difference ( Difference )
1、 The hardware environment is different :
C/S Built on a private network , Small scale network environment ( relative B/S), The LAN provides connection and data exchange services through special servers .
B/S Built on Guangcheng online , No special network hardware environment is needed
2、 Different safety requirements :
C/S Generally for relatively fixed user groups , Strong ability to control information security , General highly confidential information system adopts
B/S Built on Guangcheng online , Weak control over security , User base for unknowable users .
3、 System maintenance is different :
C/S Because of the integrity of the program , It must be examined as a whole , Upgrading is difficult , More based on Windows On , There are limited ways of expression , High requirements for programmers .
B/5 Seamless system upgrade , Maintenance costs are small , There are richer forms of expression , Development is less difficult .
4、 Dealing with problems is different :
C/S Handle user fixed , High security requirements , Require the same operating system .
B/S For all users , Widely dispersed , Small requirements for the system .
6、 ... and 、 What are automatic boxing and automatic unpacking
java For every basic type, the corresponding packaging type is provided in .
byte,short,char,int,long,float,double and boolean
Byte,Short,Character,Integer,Long,Float,Double,Boolean.
Automatic packing is Java Automatically convert the original type value to the corresponding object , For example, will int The variables of are converted to Integer object , This process is called packing , And vice versa Integer Object conversion to int Type values , This process is called unpacking . Because the packing and unpacking are automatic non-human conversion , So it's called automatic packing and unpacking .
边栏推荐
- Use of construction methods
- Tower of Hanoi classic recursion problem (C language implementation)
- Back propagation process of manual BP neural network
- [c language] PTA 7-51 sum the first n terms of odd part sequence
- Pycharm reports an error when connecting to the virtual machine database
- Leetcode 686. KMP method of repeatedly superimposing strings (implemented in C language)
- C language: enumerating knowledge points summary
- Webrtc realizes simple audio and video call function
- redux快速上手
- Oracle 插入数据
猜你喜欢

Unity Foundation (3) -- various coordinate systems in unity

正确的用户拖拽方式

spinning up安装完使用教程测试是否成功,出现Library“GLU“ not found和‘from pyglet.gl import *错误解决办法

用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案

数据湖:分布式开源处理引擎Spark

Auto.js脚本开发环境搭建

Classes and objects (III)

Realize the effect of univariate quadratic equation through JS. Enter the coefficients of a, B and C to calculate the values of X1 and x2

Use of construction methods
![[QT learning notes] * insert pictures in the window](/img/72/ecac8fb35a404130ee020db572a4b4.png)
[QT learning notes] * insert pictures in the window
随机推荐
JVM (heap and stack) memory allocation
Build auto.js script development environment
STL source code analysis (Hou Jie) notes - STL overview
[c language] PTA 7-48 find the number of combinations
[C language] PTA 7-47 binary leading zero
GCC Basics
DASCTF2022.07赋能赛
Log configuration logback
visio画网格
Webrtc realizes simple audio and video call function
TypeError: Cannot read properties of undefined (reading ‘then‘)
6.pytest生成allure报告
Pytorch fixed random seed & recurrence model
Laya中的A星寻路
钉钉对话框文子转换成图片 不能复制粘贴到文档上
如何避免示波器电流探头损坏
删除word文档中的空白页
Mysql各版本下载地址及多版本共存安装
Google browser opens the web page and out of memory appears
[QT learning notes] * insert pictures in the window