Cov txheej txheem:

Dab tsi yog clustered index hauv SQL Server nrog piv txwv?
Dab tsi yog clustered index hauv SQL Server nrog piv txwv?

Video: Dab tsi yog clustered index hauv SQL Server nrog piv txwv?

Video: Dab tsi yog clustered index hauv SQL Server nrog piv txwv?
Video: Data Science with Python! Analyzing File Types from Avro to Stata 2024, Kaum ib hlis
Anonim

Clustered Index. Ib pawg index txhais cov kev txiav txim uas cov ntaub ntawv yog lub cev khaws cia rau hauv ib lub rooj. Cov ntaub ntawv cov ntaub ntawv tuaj yeem txheeb tau hauv tib txoj kev, yog li ntawd, tsuas muaj ib qho kev ntsuas ntawm ib lub rooj xwb. Hauv SQL Server, lub thawj tus yuam sij txwv cia li tsim ib pawg index ntawm cov kab ke.

Tom qab ntawd, ib tus tuaj yeem nug, dab tsi yog pawg SQL Server?

SQL Server muaj ob hom indexes : pawg index thiab tsis- pawg index . A pawg index khaws cov ntaub ntawv kab nyob rau hauv ib tug sorted qauv raws li nws cov tseem ceeb qhov tseem ceeb. Txhua lub rooj tsuas muaj ib qho xwb pawg index vim cov ntaub ntawv kab tsuas tuaj yeem txheeb tau hauv ib qho kev txiav txim. Lub rooj uas muaj a pawg index npe a pawg rooj.

Kuj Paub, dab tsi yog qhov ntsuas tsis yog pawg hauv SQL Server nrog piv txwv? Taw qhia rau SQL Server tsis - pawg indexes Nws yog ib daim qauv ntawm cov kab lus xaiv ntawm cov ntaub ntawv los ntawm ib lub rooj nrog cov kev txuas mus rau lub rooj sib txuas. Zoo ib yam li a pawg index , a tsis suav nrog index siv B-ntoo qauv los npaj nws cov ntaub ntawv.

Kuj paub, dab tsi yog ib qho kev sib koom ua ke?

A pawg index yog hom tshwj xeeb ntawm qhov ntsuas uas reorders txoj kev cov ntaub ntawv nyob rau hauv lub rooj yog lub cev khaws cia. Yog li lub rooj tuaj yeem muaj ib qho xwb pawg index . Cov nplooj ntawm a pawg index muaj cov nplooj ntawv cov ntaub ntawv.

Yuav ua li cas thiaj tsim tau pawg index hauv SQL Server nrog piv txwv?

Txhawm rau tsim kom muaj kev sib koom ua ke los ntawm kev siv Table Designer

  1. Hauv Object Explorer, nthuav cov ntaub ntawv uas koj xav tsim ib lub rooj nrog ib pawg index.
  2. Right-click the Tables folder and click New Table.
  3. Tsim ib lub rooj tshiab raws li koj ib txwm xav.
  4. Right-click lub rooj tshiab tsim saum toj no thiab nyem Tsim.

Pom zoo: