Dab tsi yog cov lus nug tus nqi hauv DBMS?
Dab tsi yog cov lus nug tus nqi hauv DBMS?

Video: Dab tsi yog cov lus nug tus nqi hauv DBMS?

Video: Dab tsi yog cov lus nug tus nqi hauv DBMS?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Kaum ib hlis
Anonim

Nqe lus nug = (tus naj npawb ntawm kev nrhiav haujlwm X qhov nruab nrab nrhiav sijhawm) + (ntau lub blocks nyeem X nruab nrab hloov sijhawm rau kev nyeem ib lub block) + (tus naj npawb ntawm cov blocks sau X nruab nrab lub sijhawm hloov mus rau kev sau ntawv block)

Ib yam li ntawd, nqe lus nug yog dab tsi?

Nqe lus nug yog dab tsi optimizer xav txog ntev npaum li cas koj nug yuav siv sij hawm (kwv yees rau tag nrho cov sij hawm batch). Lub optimizer sim xaiv qhov zoo tshaj plaws nug npaj los ntawm saib koj nug thiab txheeb cais ntawm koj cov ntaub ntawv, sim ntau yam kev npaj ua tiav thiab xaiv tus nqi qis tshaj ntawm lawv.

Kuj Paub, dab tsi yog lus nug compiler hauv DBMS? Cov nug - compiler pob yog ib txheej ntawm cov cuab yeej rau kev tshuaj xyuas cov txheej txheem ntawm nug muab tso ua ke. Nws qhia li cas SQL nug yog parsed, desugared, txhais nyob rau hauv relational algebra thiab optimized. sql-pem hauv ntej yog siv los txheeb xyuas SQL nug mus rau abstract syntax rau SQL.

Kuj kom paub yog, koj txhais li cas los ntawm kev nug txog kev npaj?

A query plan (los yog query execution plan ) yog ib theem ntawm cov kauj ruam uas siv los nkag mus rau cov ntaub ntawv hauv SQL relational database tswj system. Vim nug optimizers yog tsis zoo, cov neeg siv cov ntaub ntawv thiab cov thawj coj qee zaum yuav tsum tau kuaj xyuas thiab kho cov ntaub ntawv kev npaj tsim los ntawm optimizer kom tau txais kev ua tau zoo dua.

Cov lus nug optimization nrog piv txwv yog dab tsi?

Lus nug optimization yog ib feem ntawm nug txheej txheem nyob rau hauv uas lub database system piv txawv nug cov tswv yim thiab xaiv ib qho nrog tus nqi tsawg kawg nkaus. Lub optimizer kwv yees tus nqi ntawm txhua txoj kev ua ntawm cov nug thiab xaiv qhov uas muaj qhov kwv yees qis tshaj plaws. Tam sim no, feem ntau cov tshuab siv qhov no.

Pom zoo: