Schema optimization and indexing

Source: Internet
Author: User

Special types of data

Some special types of data may not be directly compatible with the MySQL built-in type. One example is to use Stamptime to store more accurate time.

Another example is the IP address. People often use varchar (15) to store IP addresses. However, an IP address is actually an unsigned 32bit integral type, not a string. The IP address is just a bit more convenient for people to read IP addresses. You should use unsigned integers to store IP addresses. MySQL provides the Inet_aton () and Inet_ntoa () functions to resolve both types of conversions. Later versions of MySQL. It provides a data type that is dedicated to storing IP addresses.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.