当前位置:网站首页>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 .
边栏推荐
- Auto.js脚本开发入门
- [C language] PTA 7-52 finding the sum of the first n terms of a simple interleaved sequence
- Makefile+Make基础知识
- Why is it necessary to scale the attention before softmax (why divide by the square root of d_k)
- Classes and objects (II)
- TypeError: Cannot read properties of undefined (reading ‘then‘)
- 异常处理:pyemd或PyEMD找不到
- VScode配置makefile编译
- Google browser opens the web page and out of memory appears
- [C language] PTA 7-91 output leap year
猜你喜欢

mujoco和mujoco_py安装以及解决libXcursor.so.1:NO such dictionary
![Configure st-gcn environment record [Google lab]](/img/dc/138a40b01ebb4c79b6758d4642d47b.png)
Configure st-gcn environment record [Google lab]

Review key points and data sorting of information metrology in the second semester of 2022 (teacher zhaorongying of Wuhan University)

Google browser opens the web page and out of memory appears

Star a pathfinding in LAYA

Classes and objects (I)

Record the Niua packaging deployment project

Redux quick start

Delete blank pages in word documents

使用容器部署Jenkins
随机推荐
Corresponding order of 18 and 25coco data of openpose and joint points
The daily life of programmers
JVM (heap and stack) memory allocation
Use of construction methods
How to build a mobile studio network?
Unity Foundation (3) -- various coordinate systems in unity
mujoco和mujoco_py安装以及解决libXcursor.so.1:NO such dictionary
img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)
Opencv environment construction
Classes and objects (II)
Vscode configuration makefile compilation
Classes and objects (III)
Log configuration logback
Mpc5744p introduction and opensda firmware update
MySQL - 聚簇索引和辅助索引
Reveal安装配置调试
Command line interactive tools (latest version) inquirer practical tutorial
Christmas tree web page and Christmas tree application
C language: enumerating knowledge points summary
Classes and objects (I)