数据类型和查询速度 [英] Data types and query speed

查看:97
本文介绍了数据类型和查询速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据类型是否会影响查询速度。在行很少的表中使用smallint instedof int甚至tinyint之类的正确类型有多重要。

Does the type of data has an impact on the speed of queries. How important is to use correct types like smallint instedof int or even tinyint in tables which has small amount of rows.

执行查询

select * from table

推荐答案

它可能会影响性能,例如,数据大小越小,获取它们的速度就越快,它们在磁盘上需要的页面越少。因此,您必须尝试选择尽可能小的尺寸。

It can affect performance, for example, the smaller data size the quicker you can get them, the less pages they reqire on disk. So you have to try to choose type of smallest possible size.

这篇关于数据类型和查询速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆