3 years ago, a small project experience, to share rookie brothers (sending and receiving documents small software: small skill SmallDatetime) ...

This system has a database of more than 100 M, which of course there are a lot of tables, each of my table, there are several fields is the same
example CreateUserID, CreateDate, ModifyUserID, ModifyDate. These fields indicate the number of
data who created, created when the data was last modified who, when modified.

Problems arose, which CreateDate, ModifyDate I always use Datetime data type, I think if I can optimize a
lower my database, the database allows better performance of some, I think, will save some space with more SmallDatetime
can enhance the computing speed, I put my database of all the tables in these two fields are modified to SmallDatetime up.

A miracle happened, into a database of more than 80 M, it is such a change, let my database becomes lighter 20M, and my heart was great,
the database is small, even if nothing else modified, I think, most speed too fast to read at least some of it.

So I suggest that you, if SmallDatetime range of data has been able to meet your requirements, do not use Datetime.
Performance can be higher, even if some of it high. I hope that this document is not white you read, read some small experience.

 

Welcome criticism pointing, environmental communication message.

Reproduced in: https: //my.oschina.net/iwenr/blog/227684

Guess you like

Origin blog.csdn.net/weixin_34281537/article/details/91674827