当前位置:网站首页>0727~面试题梳理
0727~面试题梳理
2022-07-28 05:30:00 【生活可真难啊】
索引创建的原则?
where判断条件经常使用的条件;
更新频繁的列不要用索引;
对于查询很少涉及的列,不要建索引;
基数较小的类不要建索引;
定义有外键的列一定要建索引;
ArrayList和LinkList的区别?
ArrayList底层基于动态数组,而LinkList底层基于双向链表;
ArrayList查询和修改快,而LinkList是删除和新增快;
什么是双亲委派模型?
在类的加载器中,往上委派是寻找缓存,然后往下委派是寻找加载路径;
向上委派是到顶层加载器为止,向下委派是到发起的加载器为止;
在mybatis中$和#的区别?
mybatis中的$是字符串拼接,在sql中会把${}换成statement直接给变量赋值,所以会有sql注入的问题;
mybatis中的#是占位符,进行预编译处理,在sql中会把#{}换成?,然后用preperdstatement给变量赋值,所以可以有效防止sql注入的问题,
MySql里面的慢查询统计过吗?怎么优化的?
首先看是因为什么导致的慢查询,是索引未命中,还是查询语句的判断条件加载了多的数据,还是数据量太大了;
先查看索引有没有命中,然后修改查询语句,尽可能的命中索引;
看查询语句与判断条件有没有加载多余的数据,导致索引失效了,然后修改语句;
看数据库是不是数据量太过庞大了,导致查询慢,要进行分库分表;
数据库的三大范式?
第一大范式:列和数据不可再分,保持数据的原子性,数据不可再分;
第二大范式:数据记录具有唯一性,一张表只能说一件事;
第三大范式:数据库中的数据不能具有传递关系,必须和主键具有直接关系,不能是间接关系;
Runnable和callable的区别?
Runnable接口无返回值,callable接口有返回值;
Runnable接口不能捕获异常,callable可以捕获异常;
边栏推荐
- Tailing microelectronics B91 general development board integrated into the trunk of openharmony community
- Not used for the longest time recently
- The H5 input box of the mobile terminal adjusts the soft keyboard of the mobile phone, causing the fixed positioning at the bottom to be jacked up. Solution
- Circular linked list problem
- 5G 商用第三年:无人驾驶的“上山”与“下海”
- C language push box
- Standard C language learning summary 8
- C language maze
- Standard C language learning summary 5
- easypoi导出隔行样式设置
猜你喜欢

Install pycharm

Circular linked list problem

Redis主从复制原理及配置

隔离级别RR、间隙锁、幻读

Codesensor: convert the code into AST and then into text vector

js二级联动院系

Neo4j running error occurred during initialization of VM incompatible minimum and maximum heap sizes spec

深入剖析单例模式的实现

A timed task reminder tool

map使用tuple实现多value值
随机推荐
VNC Timed out waiting for a response from the computer
[a little knowledge] AQS
小红花STL
C language review (modifier article)
Softmax multi classification gradient derivation
高响应比优先
Anaconda3 cannot open navigator solution
Shell --- conditional statement practice
Tailing microelectronics B91 general development board integrated into the trunk of openharmony community
2018-cvpr-Gesture Recognition: Focus on the Hands
登录heroku出现 IP address mismatch的解决方案
How to connect the uniapp project to the real mobile phone for debugging
视频格式基础知识:让你了解MKV、MP4、H.265、码率、色深等等
Open virtual machine kali2022.2 and install GVM
Freemaker exports word with tables and multiple pictures to solve the repetition and deformation of pictures
Implementation method of converting ast into word vector before converting word vector
WiFi one click connection configuration of raspberry pie
Leetcode then a deep copy of the linked list
Easypoi export interlaced style settings
大话持久性与redolog