当前位置:网站首页>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 .
边栏推荐
- VScode配置makefile编译
- Use of construction methods
- [c language] PTA 7-49 have fun with numbers (partially correct)
- [c language] PTA 7-55 query fruit price
- 谷歌浏览器 打开网页出现 out of memory
- Build auto.js script development environment
- What is the difference between field, variable and property
- 钉钉对话框文子转换成图片 不能复制粘贴到文档上
- Simply change the picture color
- Laya中的A星寻路
猜你喜欢

使用容器部署Jenkins

使用更灵活、更方便的罗氏线圈

安装spinning up教程里与mujoco对应的gym,报错mjpro150

Actual combat of flutter - DIO of request encapsulation (II)

论pyscript使用感想(实现office预览)
![[QT learning notes] * insert pictures in the window](/img/72/ecac8fb35a404130ee020db572a4b4.png)
[QT learning notes] * insert pictures in the window

Pytoch distributed training

On the use of pyscript (realizing office preview)

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

用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案
随机推荐
Configure st-gcn environment record [Google lab]
mpc5744p简介与OpenSDA固件更新
Laya中的A星寻路
TypeError: Cannot read properties of undefined (reading ‘then‘)
手机工作室网络如何组建?
Use of torch.optim optimizer in pytorch
央企建筑企业数字化转型核心特征是什么?
I++ and ++i details
如何避免示波器电流探头损坏
def fasterrcnn_resnet50_fpn()实例测试
Pyqt5 learning pit encounter and pit drainage (3) background picture coverage button style and check button status
[C] PTA 6-8 finding the height of binary tree
Niuke IOI weekly 27 popularity group
C language: enumerating knowledge points summary
Nail dialog text converted to pictures cannot be copied and pasted on the document
Idea small settings
Reveal安装配置调试
Mujoco and mujoco_ Install libxcursor.so 1:NO such dictionary
Classes and objects (II)
post导出数据,返回