Cov txheej txheem:

Yuav ua li cas saib txhim kho kev ua tau zoo hauv SQL Server?
Yuav ua li cas saib txhim kho kev ua tau zoo hauv SQL Server?

Video: Yuav ua li cas saib txhim kho kev ua tau zoo hauv SQL Server?

Video: Yuav ua li cas saib txhim kho kev ua tau zoo hauv SQL Server?
Video: Kev Muag Khoom thiab Kev Sib Cuam Tshuam Nrog Cov Neeg Qhua Yam Muaj Kev Nyab Xeeb 2024, Kaum ib hlis
Anonim

Nrog SQL Server 2000, lub functionality ntawm SQL Server saib tau nthuav dav rau muab qhov system kev ua tau zoo cov txiaj ntsig. Nws yog ua tau rau tsim ib qho kev qhia tshwj xeeb ntawm qhov pom, nrog rau cov indexes tsis suav nrog, txhim kho cov ntaub ntawv nkag kev ua tau zoo ntawm cov lus nug nyuaj tshaj plaws.

Tsis tas li ntawd, cov ntaub ntawv puas pom kev txhim kho kev ua haujlwm?

A saib nyob rau hauv thiab ntawm nws tus kheej yuav tsis nce kev ua tau zoo . Nrog hais tias nyob ntawm tus database engine koj siv muaj tej yam koj ua tau nrog a saib . Hauv SQL Server koj ua tau muab ib qho index rau ntawm saib (Xav tias saib haum rau ntau yam kev xav tau). Qhov no ua tau zoo heev txhim kho tus kev ua tau zoo.

Tsis tas li ntawd, qhov twg yog saib sai dua lossis rooj hauv SQL Server? Yog vim li cas saib 'ua' sai dua yog tias lub cav database muaj peev xwm ua tau qee yam ntawm kev ua haujlwm ua ntej (nws tuaj yeem npaj thiab ua kom zoo dua Query Execution Plan piv txwv). Qhov no kuj yog ib qho ntawm cov laj thawj uas khaws cov txheej txheem feem ntau sai dua dua li ua cov lus nug ncaj qha.

Ua li no, yuav ua li cas txhim kho SQL Server database kev ua tau zoo?

Lub tswv yim los txhim kho SQL Server kev ua tau zoo & tsim database

  1. Xaiv Hom Cov Ntaub Ntawv Tsim Nyog.
  2. Tsis txhob nchar thiab nvarchar.
  3. Tsis txhob NULL nyob rau hauv qhov ntev-ntev teb.
  4. Zam * hauv SELECT nqe lus.
  5. Siv EXISTS es tsis txhob IN.
  6. Tsis txhob muaj Clause.
  7. Tsim Clustered thiab Non-Clustered Index.
  8. Khaws qhov ntsuas ntsuas me me.

Puas views qeeb database?

Qhov cuav yog qhov ntawd Saib yog qeeb dua vim cov database yuav tsum xam lawv ua ntej lawv siv los koom rau lwm lub rooj thiab ua ntej qhov twg clauses raug siv. Lub optimizer ces koom nrog cov ntaub ntawv ua ke nrog indexes zoo tshaj plaws nws ua tau, ib yam li nws ua nrog cov ntsiab lus tsis pom, thiab tom qab ntawd tag nrho cov lus nug tau khiav.

Pom zoo: