6.农芯科技面试

1.SpringBoot注解

我的回答:@SpringBootApplication,@EnableAutoConfiguration、RestController、@Mapper、@Repository、@Service、@Controller、@Autowired、@Resource

标准回答:

  1. @SpringBootApplication包含@SpringBootConfiguration、@EnableAutoConfiguration、@ComponentScan
  2. @ConfigurationProperties
  3. @Mapper、@Repository、@Service、@Controller/@RestController
  4. @Value、@RequestBody、@PathVariable、@RequestParam
  5. @Transactional

2.Sql优化(上次还问过,这次还是说少了)

我的回答:索引优化、联表查询

标准回答:

  1. 最大化利用索引
  2. 避免全表扫描
  3. 尽可能返回需要的数据
  4. 查询条件优化,join优化,分页查询
  5. 建表优化,在where、order by字段建立索引,大数据使用分页查询

3.索引类型

我的回答:

  • 根据数据结构分为B+索引、Hash索引、全文索引
  • 主键索引、唯一索引
  • 聚簇索引、非聚簇索引

标准回答:

  1. 数据结构分为B+Tree索引、
  2. 物理存储:聚簇索引、二级索引
  3. 字段特性:主键、唯一、前缀
  4. 字段个数:单列索引、联合索引
posted @ 2024-04-18 11:45  求知律己  阅读(14)  评论(0编辑  收藏  举报