Lub tshuab nqus tsev ua Postgres yog dab tsi?
Lub tshuab nqus tsev ua Postgres yog dab tsi?

Video: Lub tshuab nqus tsev ua Postgres yog dab tsi?

Video: Lub tshuab nqus tsev ua Postgres yog dab tsi?
Video: Nyhuv Tawm Rooj Hlauv yog vim dabtsi? by Ncais 2024, Kaum ib hlis
Anonim

VACUUM reclaims cia occupied los ntawm tuples tuag. Hauv ib txwm PostgreSQL kev ua haujlwm, tuples uas raug tshem tawm lossis tshem tawm los ntawm kev hloov tshiab tsis raug tshem tawm ntawm lawv lub rooj; lawv tseem nyob mus txog thaum ib VACUUM ua tiav. VACUUM ANALYZE ua ib VACUUM thiab tom qab ntawd ib qho ANALYZE rau txhua lub rooj xaiv.

Ua kom pom qhov no, kev siv lub tshuab nqus tsev hauv PostgreSQL yog dab tsi?

Cov VACUUM nqe lus yog siv kom rov qab khaws cia los ntawm kev tshem tawm cov ntaub ntawv tsis siv neeg lossis tuples los ntawm PostgreSQL database.

Kuj Paub, dab tsi yog lub tshuab nqus tsev khov hauv Postgres? Lub tshuab nqus tsev khov khij lub rooj cov ntsiab lus nrog lub sijhawm tshwj xeeb heev ntawm kev hloov pauv uas qhia postgres tias nws tsis tas yuav nqus tsev, puas tau. Hloov tshiab tom ntej no khov id yuav ploj mus. Piv txwv li, template0 database yog khov vim nws yeej tsis hloov pauv (los ntawm lub neej ntawd koj tsis tuaj yeem txuas rau nws.)

Ua raws li qhov xav tau, lub tshuab nqus tsev puv ua li cas?

VACUUM FULL . VACUUM FULL sau cov tag nrho cov ntsiab lus ntawm lub rooj rau hauv cov ntaub ntawv disk tshiab thiab tso qhov chaw khib nyiab rov qab rau OS. Qhov no ua rau lub rooj-theem xauv ntawm lub rooj thiab qeeb ceev. VACUUM FULL yuav tsum yuav tsum zam ntawm lub siab load system.

Lub tshuab nqus tsev Postgres siv sijhawm ntev npaum li cas?

Re: VACUUM Tag Nrho siv ntev sij hawm ua kom tiav. hais lus, lub tshuab nqus tsev tag nrho tsis tsim nyog, thiab tag nrho tsis yog lub tswv yim zoo. hnov) koj tuaj yeem txo qhov cuam tshuam los ntawm kev tawg txoj haujlwm. txoj hauj lwm yuav tsum xwb coj txog 5 feeb.

Pom zoo: