SQL View Index

Source: Internet
Author: User

View:

The view is equivalent to a query result, which corresponds to a table

Table----where data is actually stored

View---does not store data, showing the results of the query

Attention:

1, the view is for the convenience of querying data. Generally do not attempt to insert data into the view, error-prone.

2. Views can be generated by a single table or generated by multiple tables, and a new view can be generated from each view of the table.

3, the main function of the view is to query, not to increase the deletion.

Operation:

1. Right click on the view and click New View

2, the construction of a good view, the query statement written in the box below

Index:

Indexes are designed to improve the efficiency of queries

Indexes are clustered and non-clustered indexes

1. The default storage order of data is the same as the order of the cluster index. Only one cluster index can be in a table.
2. The non-clustered index is placed separately, when querying, first check the non-family index, and then follow the non-clustered index query content. , a table can have multiple non-clustered indexes.

Attention:

Index to improve query efficiency, but will affect the efficiency of adding and deleting.
Operation:

1, in the table design interface, click the column to be indexed, right-click the ' Index/key '

2. Click Add in the bottom left corner of the pop-up box and select the index on the right.

SQL View Index

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.