Kategorie szkoleń | Egzaminy | Kontakt

Odpowiedź (1)

  • 3

Nie zawsze.  Minimalne logowanie polega na umieszczeniu w logu transakcyjnym informacji, że dana strona została w dodana do stron przypisanych do tabeli w wyniku operacji masowego importu i w całości wypełniona danymi podczas tej operacji, wtedy zamiast informacji o dodaniu poszczególnych rekordów zostaje umieszczony wpis o dodaniu danej strony do tabeli.

Sposób logowania jest uzależniony od wielu czyników opisanych w: http://msdn.microsoft.com/en-us/library/dd425070%28v=sql.100%29.aspx

Aby zilustrować złożoność problemu, można posłużyć się tabelą zamieszczoną na zalinkowanej stronie:

Table Indexes Rows in table Hints Without TF 610 With TF 610 Concurrent possible

Heap

Any

TABLOCK

Minimal

Minimal

Yes

Heap

Any

None

Full

Full

Yes

Heap + Index

Any

TABLOCK

Full

Depends (3)

No

Cluster

Empty

TABLOCK, ORDER (1)

Minimal

Minimal

No

Cluster

Empty

None

Full

Minimal

Yes (2)

Cluster

Any

None

Full

Minimal

Yes (2)

Cluster

Any

TABLOCK

Full

Minimal

No

Cluster + Index

Any

None

Full

Depends (3)

Yes (2)

Cluster + Index

Any

TABLOCK

Full

Depends (3)

No

Table 1: Summary of minimal logging conditions

(1) If you are using the INSERT … SELECT method, the ORDER hint does not have to be specified, but the rows must be in the same order as the clustered index. If using BULK INSERT the order hint must be used.

(2) Concurrent loads only possible under certain conditions. See “Bulk Loading with the Indexes in Place”. Also, only rows written to newly allocated pages are minimally logged.

(3) Depending on the plan chosen by the optimizer, the nonclustered index on the table may either be fully- or minimally logged.

  • Odpowiedział
  • @ | 20.07.2013
  • TRENER ALTKOM AKADEMII