当前位置:网站首页>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可以捕获异常;
边栏推荐
- 2018-cvpr-Gesture Recognition: Focus on the Hands
- GFS分布式文件系统
- guava之EventBus
- Standard C language learning summary 8
- Earliest deadline first (EDF)
- Current limiting ratelimiter of guava
- Codesensor: convert the code into AST and then into text vector
- Shell--- sed statement exercise
- C language review (pointer)
- 深入剖析单例模式的实现
猜你喜欢

Rsync+inotify to realize remote real-time synchronization

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

浅谈深分页问题

MHA高可用配置及故障切换

The.Joernindex database has no content after Joern runs

CAS vs 数据库乐观锁

A timed task reminder tool

Understanding of maximum likelihood estimation, gradient descent, linear regression and logistic regression

Freemaker merges cells, uses if and else tags, and processes null and empty strings

最早截止时间优先(EDF)
随机推荐
Standard C language summary 1
Image segmentation method
VLAN configuration
Open virtual machine kali2022.2 and install GVM
MySQL excludes holidays and calculates the date difference
Shell -- first day homework
移动端H5输入框调起手机软键盘,导致底部固定定位被顶起解决方法
guava之Retryer
js上传文件的方式
最近最久未使用
metasploit渗透ms7_010练习
Serial port configuration of raspberry pie
大话持久性与redolog
vcf文件制作
Basic usage and precautions of arrow function (= >) and three-point operator (...) in ES6 (this points to)
guava之guava cache
浅谈深分页问题
Layer 3 switching and VRRP
Standard C language learning summary 8
Learning to estimate 3D hand pose from single RGB image & amp notes