In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Sqlserver in how to query the table index, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
SELECT index name = a.name
, table name = c.name
, index field name = d.name
, index field location = d.colid
FROM sysindexes a JOIN sysindexkeys b ON a.id=b.id AND a.indid=b.indid JOIN sysobjects c ON b.id=c.id JOIN syscolumns d ON b.id=d.id AND b.colid=d.colid WHERE a.indid NOT IN (0255)-- and c.xtypewritten messages U' and c.status > 0-- look up all user tables AND c.namebooks messages'--look up the specified table ORDER BY c.name.name.name
You need to create an index such as:
Determine whether there are duplicate records based on a column, and if the column is not a primary key, create an index
Create an index based on frequently queried columns
No need to create an index
Most of the contents of the fields are the same, for example, male and female
Do not create indexes on all columns to increase maintenance overhead when creating new records.
Oracle query user table index
Select index_name,index_type,table_name from user_indexes where table_name=' table name'
SqlServer queries an index on a table
SELECT TableId= O. [object _ id], TableName=O.Name,IndexId=ISNULL (KC. [object _ id], IDX.index_id), IndexName=IDX.Name,IndexType=ISNULL (KC.type_desc,'Index'), Index_Column_id=IDXC.index_column_id,ColumnID=C.Column_id,ColumnName=C.Name,Sort=CASE INDEXKEY_PROPERTY (IDXC. [object _ id], IDXC.index_id,IDXC.index_column_id,'IsDescending') WHEN 1 THEN 'DESC' WHEN 0 THEN' ASC' ELSE''END PrimaryKey=CASE WHEN IDX.is_primary_key=1 THEN N' √ 'ELSE Nissan' END, [UQIQUE] = CASE WHEN IDX.is_unique=1 THEN N' √ 'ELSE Native' END,Ignore_dup_key=CASE WHEN IDX.ignore_dup_key=1 THEN N' √ 'ELSE nasty' END,Disabled=CASE WHEN IDX.is_disabled=1 THEN N' √ 'ELSE nasty' END,Fill_factor=IDX.fill_factor Padded=CASE WHEN IDX.is_padded=1 THEN N' √ 'ELSE Noble' ENDFROM sys.indexes IDX INNER JOIN sys.index_columns IDXCON IDX. [object _ id] = IDXC. [object _ id] AND IDX.index_id=IDXC.index_idLEFT JOIN sys.key_constraints KCON IDX. [object _ id] = KC [parent _ object_id] AND IDX.index_id=KC.unique_index_idINNER JOIN sys.objects OON O. [object _ id] = IDX. [object _ id] INNER JOIN sys.columns CON O. [object _ id] = C. [object _ id] AND O.type='U'AND O.is_ms_shipped=0AND IDXC.Column_id=C.Column_id where O.nameplate query cz201'-- cz201 is the table you want to query. Will it help you to see the above content after reading the above? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.