fix issues

This commit is contained in:
Kristofers Solo 2024-05-07 00:34:35 +03:00
parent 97934dd5ac
commit 1cd6f44af8

View File

@ -87,10 +87,10 @@ Simplified version (to get the idea)
for each tuple tr in r: (for each tuple ts in s: test pair (tr, ts)) for each tuple tr in r: (for each tuple ts in s: test pair (tr, ts))
``` ```
Block transfer cost: $n_r b_s + b_r$ block transfers would be required, Block transfer cost: $n_r dot b_s + b_r$ block transfers would be required,
where $b_r$ -- blocks in relation $r$, same for $s$. Each scan of the inner where $b_r$ -- blocks in relation $r$, same for $s$. Each scan of the inner
relation requires one seek, and the scan of the outer relation requires one relation requires one seek, and the scan of the outer relation requires one seek
seek per block, leading to a total of $2 b_r$ seeks. per block, leading to a total of $2 dot b_r$ seeks.
== Block-nested join == Block-nested join
@ -306,19 +306,20 @@ serializable.
== Protocols == Protocols
We say that a schedule S is *legal* under a given locking protocol if S is a possible We say that a schedule S is *legal* under a given locking protocol if S is a
schedule for a set of transactions that follows the rules of the locking protocol. We say possible schedule for a set of transactions that follows the rules of the
that a locking protocol ensures conflict serializability if and only if all legal schedules locking protocol. We say that a locking protocol ensures conflict
are *conflict serializable*; in other words, for all legal schedules the associated →relation serializability if and only if all legal schedules are *conflict serializable*;
is acyclic. in other words, for all legal schedules the associated $->$ relation is acyclic.
\ *Recoverable* schedule is one where, for each pair of transactions $T_i$ and
*Recoverable* schedule is one where, for each pair of transactions $T_i$ and
$T_j$ such that $T_j$ reads a data item previously written by $T_i$, the commit $T_j$ such that $T_j$ reads a data item previously written by $T_i$, the commit
operation of $T_i$ appears before the commit operation of $T_j$. operation of $T_i$ appears before the commit operation of $T_j$.
\ *Cascadeless* schedule is one where, for each pair of transactions $T_i$ and
$T_j$ such that $T_j$ reads a data item previously written by $T_i$, the commit
operation of $T_i$ appears before the read operation of $T_j$.
Every cascadeless schedule is also recoverable.
*Cascadeless* schedule is one where, for each pair of transactions $T_i$ and
$T_j$ such that $T_j$ reads a data item previously written by $T_i$, the commit
operation of $T_i$ appears before the read operation of $T_j$. Every cascadeless
schedule is also recoverable.
=== Lock-based === Lock-based
@ -485,7 +486,7 @@ $B=5;T_"disk"=0.001;T_"seek"=0.1$
=== Nested-Loop Join Method === Nested-Loop Join Method
+ Nested-loop join: + Nested-loop join:
- For each pattern in $r_1$, search all patterns in $r_2$. - For each pattern in $r_1$, search all patterns in $r_2$.
+ Total Combinations: $75435 dot 11456=$ + Total Combinations: $75435 dot 11456$
+ Time Calculation for Nested-Loop Join: + Time Calculation for Nested-Loop Join:
- Reading and searching time for each combination: $0.001+0.1=0.101 "ms"$ - Reading and searching time for each combination: $0.001+0.1=0.101 "ms"$
- Total time: $75435 dot 11456 dot 0.101 = 87282519.36 "ms"$ - Total time: $75435 dot 11456 dot 0.101 = 87282519.36 "ms"$