当前位置:网站首页>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 .
边栏推荐
- UE plays video in scene or UMG
- Oracle insert data
- [C language] PTA 7-47 binary leading zero
- There are objections and puzzles about joinpoint in afterreturning notice (I hope someone will leave a message)
- Update learning materials daily
- 恒星科通邀您“湘”约第24届中国高速公路信息化大会暨技术产品展示会
- Oracle 插入数据
- Unity基础(3)—— unity中的各种坐标系
- 读懂 互联网巨头 【中台之战】 以及 中台 发展思维
- C语言实现三子棋
猜你喜欢

The most complete NLP Chinese and English stop words list in the whole station (including punctuation marks, which can be copied directly)

Classes and objects (I)

在线教育的推荐系统

The third ACM program design competition of Wuhan University of Engineering

恒星科通邀您“湘”约第24届中国高速公路信息化大会暨技术产品展示会

redux快速上手

Deploy Jenkins using containers

UE 在场景或UMG中播放视频

命令行交互工具(最新版) inquirer 实用教程

Common current limiting methods
随机推荐
Webrtc realizes simple audio and video call function
OpenCV环境搭建
Introduction to auto.js script development
Classes and objects (I)
Makefile+make Basics
Oracle insert data
There are objections and puzzles about joinpoint in afterreturning notice (I hope someone will leave a message)
mpc5744p简介与OpenSDA固件更新
Common rules of makefile (make) (II)
Unity基础(3)—— unity中的各种坐标系
Detailed comparison of break and continue functions
使用近场探头和电流探头进行EMI干扰排查
How to build a mobile studio network?
es6和commonjs对导入导出的值修改是否影响原模块
MySQL - 聚簇索引和辅助索引
Use of torch.optim optimizer in pytorch
ssm整合增删改查
[C language] PTA 7-47 binary leading zero
MySQL - 深入解析MySQL索引数据结构
[c language] PTA 7-49 have fun with numbers (partially correct)