SELECT * and select All

Source: Internet
Author: User

The SELECT * and select all fields have the same effect on the query, and the speed is the same.

But in theory, select * will be quicker.

Because

1.select all fields consume more on data transfer, if the speed of hundreds of fields is not necessarily negligible.

2. The database query parses the query field before execution, and if it is a select * then this step is not required.

Note: For an ORM structure, general code instantiation is generally taken out of the field, when select * is slightly more maintainable, but the field name may be conflicting when select * Multiple table.

SELECT * and select All

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.