pull/1/head
Oliver Kennedy 2021-03-11 18:24:19 -05:00
parent 6e90f0ce54
commit e0c0cb412b
Signed by: okennedy
GPG Key ID: 3E5F9B3ABD3FDB60
4 changed files with 82 additions and 80 deletions

0
.rake_tasks~ Normal file
View File

View File

@ -1,4 +1,22 @@
[ [
{ "title" : "SCC-PG: A Sustainable and Connected Community-Scale Food System to Empower Consumers, Farmers, and Retailers",
"agency" : "NSF: SCC",
"role" : "Co-PI",
"amount" : 150000,
"effort" : "20%",
"status" : "submitted",
"start" : "08/15/2021", "end" : "08/14/2022",
"type" : "grant",
"commitment" : { },
"projects" : ["vizier"],
"copis" : [
"Samina Raja",
"Sara Behdad",
"Debabrata Talukdar",
"Srirangaraj Setlur",
"Emmanuel Frimpong Boamah"
]
},
{ "title" : "HDR Institute: Institute for data enabled functional soft material innovation", { "title" : "HDR Institute: Institute for data enabled functional soft material innovation",
"agency" : "NSF: HDR", "agency" : "NSF: HDR",
"role" : "Co-PI", "role" : "Co-PI",
@ -30,7 +48,7 @@
"role" : "Co-PI", "role" : "Co-PI",
"amount" : 50000, "amount" : 50000,
"effort" : "20%", "effort" : "20%",
"status" : "submitted", "status" : "rejected",
"start" : "11/01/2020", "end" : "02/28/2021", "start" : "11/01/2020", "end" : "02/28/2021",
"type" : "grant", "type" : "grant",
"commitment" : { }, "commitment" : { },

View File

@ -125,7 +125,7 @@ textbook: Ch. 16
<tr class="fragment" data-fragment-index="7"> <tr class="fragment" data-fragment-index="7">
<td style="vertical-align: middle;">Sort <span class="fragment" data-fragment-index="8">(In-Mem)</span></td> <td style="vertical-align: middle;">Sort <span class="fragment" data-fragment-index="8">(In-Mem)</span></td>
<td style="vertical-align: middle;">$\tau(R)$</td> <td style="vertical-align: middle;">$\tau(R)$</td>
<td class="fragment" data-fragment-index="8">$0$</td> <td class="fragment" data-fragment-index="8">$\textbf{io}(R)$</td>
<td class="fragment" data-fragment-index="9">$O(|R|)$</td> <td class="fragment" data-fragment-index="9">$O(|R|)$</td>
</tr> </tr>
<tr> <tr>
@ -267,8 +267,6 @@ textbook: Ch. 16
<section> <section>
<h3>Cardinality Estimation</h3> <h3>Cardinality Estimation</h3>
<p class="fragment">Unlike estimating IOs, cardinality estimation doesn't care about the algorithm, so we'll just be working with raw RA.</p> <p class="fragment">Unlike estimating IOs, cardinality estimation doesn't care about the algorithm, so we'll just be working with raw RA.</p>
<p class="fragment">Also unlike estimating IOs, we care about the cardinality of $|Q(R)|$ as a whole, rather than the contribution of each individual operator.</p>
</section> </section>
<section> <section>

View File

@ -15,144 +15,130 @@ textbook: Ch. 16
</ol> </ol>
</section> </section>
<section>
<h3>Accounting</h3>
<p style="margin-top: 50px;">Figure out the cost of each <b>individual</b> operator.</p>
<p style="margin-top: 50px;">Only count the number of IOs <b>added</b> by each operator.</p>
</section>
<section> <section>
<table style="font-size: 70%"> <table style="font-size: 70%">
<tr><th>Operation</th><th>RA</th><th>Total IOs (#pages)</th><th>Memory (#tuples)</th></tr> <tr><th>Operation</th><th>RA</th><th>Total IOs (#pages)</th><th>Memory (#tuples)</th></tr>
<tr> <tr >
<td>Table Scan</td> <td>Table Scan</td>
<td>$R$</td> <td>$R$</td>
<td>$\frac{|R|}{\mathcal P}$</td> <td >$\frac{|R|}{\mathcal P}$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td>Projection</td> <td>Projection</td>
<td>$\pi(R)$</td> <td>$\pi(R)$</td>
<td>$\textbf{io}(R)$</td> <td >$\textbf{io}(R)$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td>Selection</td> <td>Selection</td>
<td>$\sigma(R)$</td> <td>$\sigma(R)$</td>
<td>$\textbf{io}(R)$</td> <td>$\textbf{io}(R)$</td>
<td>$O(1)$</td> <td>$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td>Union</td> <td>Union</td>
<td>$R \uplus S$</td> <td>$R \uplus S$</td>
<td>$\textbf{io}(R) + \textbf{io}(S)$</td> <td>$\textbf{io}(R) + \textbf{io}(S)$</td>
<td>$O(1)$</td> <td>$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td style="vertical-align: middle;">Sort <span>(In-Mem)</span></td> <td style="vertical-align: middle;">Sort <span >(In-Mem)</span></td>
<td style="vertical-align: middle;">$\tau(R)$</td> <td style="vertical-align: middle;">$\tau(R)$</td>
<td>$\textbf{io}(R)$</td> <td >$\textbf{io}(R)$</td>
<td>$O(|R|)$</td> <td >$O(|R|)$</td>
</tr> </tr>
<tr> <tr>
<td>Sort (On-Disk)</td> <td >Sort (On-Disk)</td>
<td>$\tau(R)$</td> <td >$\tau(R)$</td>
<td>$\frac{2 \cdot \lfloor log_{\mathcal B}(|R|) \rfloor}{\mathcal P} + \textbf{io}(R)$</td> <td >$\frac{2 \cdot \lfloor log_{\mathcal B}(|R|) \rfloor}{\mathcal P} + \textbf{io}(R)$</td>
<td>$O(\mathcal B)$</td> <td >$O(\mathcal B)$</td>
</tr> </tr>
<tr> <tr >
<td><span>(B+Tree)</span> Index Scan</td> <td><span >(B+Tree)</span> Index Scan</td>
<td>$Index(R, c)$</td> <td>$Index(R, c)$</td>
<td>$\log_{\mathcal I}(|R|) + \frac{|\sigma_c(R)|}{\mathcal P}$</td> <td >$\log_{\mathcal I}(|R|) + \frac{|\sigma_c(R)|}{\mathcal P}$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr>
<td>(Hash) Index Scan</td> <td span >(Hash) Index Scan</td>
<td>$Index(R, c)$</td> <td span >$Index(R, c)$</td>
<td>$1$</td> <td >$1$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
</table> </table>
<ol style="font-size: 50%; margin-top: 50px;"> <ol style="font-size: 50%; margin-top: 50px;">
<li>Tuples per Page ($\mathcal P$) <span> Normally defined per-schema</span></li> <li >Tuples per Page ($\mathcal P$) <span> Normally defined per-schema</span></li>
<li>Size of $R$ ($|R|$)</li> <li >Size of $R$ ($|R|$)</li>
<li>Pages of Buffer ($\mathcal B$)</li> <li >Pages of Buffer ($\mathcal B$)</li>
<li>Keys per Index Page ($\mathcal I$)</li> <li >Keys per Index Page ($\mathcal I$)</li>
</ol> </ol>
</section> </section>
<section> <section>
<table style="font-size: 70%"> <table style="font-size: 70%">
<tr><th width="300px">Operation</th><th>RA</th><th>Total IOs (#pages)</th><th style="font-size: 80%;">Mem (#tuples)</th></tr> <tr><th width="300px">Operation</th><th>RA</th><th>Total IOs (#pages)</th><th style="font-size: 80%;">Mem (#tuples)</th></tr>
<tr> <tr >
<td style="font-size: 60%">Nested Loop Join <span>(Buffer $S$ in mem)</span></td> <td style="font-size: 60%">Nested Loop Join <span >(Buffer $S$ in mem)</span></td>
<td>$R \times_{mem} S$</td> <td>$R \times_{mem} S$</td>
<td>$\textbf{io}(R)+\textbf{io}(S)$</td> <td >$\textbf{io}(R)+\textbf{io}(S)$</td>
<td>$O(|S|)$</td> <td >$O(|S|)$</td>
</tr> </tr>
<tr> <tr>
<td style="font-size: 60%">Block NLJ (Buffer $S$ on disk)</td> <td style="font-size: 60%">Block NLJ (Buffer $S$ on disk)</td>
<td>$R \times_{disk} S$</td> <td >$R \times_{disk} S$</td>
<td>$\frac{|R|}{\mathcal B} \cdot \frac{|S|}{\mathcal P} + \textbf{io}(R) + \textbf{io}(S)$</td> <td >$\frac{|R|}{\mathcal B} \cdot \frac{|S|}{\mathcal P} + \textbf{io}(R) + \textbf{io}(S)$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr>
<td style="font-size: 60%">Block NLJ (Recompute $S$)</td> <td style="font-size: 60%">Block NLJ (Recompute $S$)</td>
<td>$R \times_{redo} S$</td> <td >$R \times_{redo} S$</td>
<td>$\textbf{io}(R) + \frac{|R|}{\mathcal B} \cdot \textbf{io}(S)$</td> <td >$\textbf{io}(R) + \frac{|R|}{\mathcal B} \cdot \textbf{io}(S)$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td>1-Pass Hash Join</td> <td>1-Pass Hash Join</td>
<td>$R \bowtie_{1PH, c} S$</td> <td>$R \bowtie_{1PH, c} S$</td>
<td>$\textbf{io}(R) + \textbf{io}(S)$</td> <td >$\textbf{io}(R) + \textbf{io}(S)$</td>
<td>$O(|S|)$</td> <td >$O(|S|)$</td>
</tr> </tr>
<tr> <tr >
<td>2-Pass Hash Join</td> <td>2-Pass Hash Join</td>
<td>$R \bowtie_{2PH, c} S$</td> <td>$R \bowtie_{2PH, c} S$</td>
<td>$\frac{2|R| + 2|S|}{\mathcal P} + \textbf{io}(R) + \textbf{io}(S)$</td> <td >$\frac{2|R| + 2|S|}{\mathcal P} + \textbf{io}(R) + \textbf{io}(S)$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td>Sort-Merge Join </td> <td>Sort-Merge Join </td>
<td>$R \bowtie_{SM, c} S$</td> <td>$R \bowtie_{SM, c} S$</td>
<td>[Sort]</td> <td >[Sort]</td>
<td>[Sort]</td> <td >[Sort]</td>
</tr> </tr>
<tr> <tr >
<td><span>(Tree)</span> Index NLJ</td> <td><span >(Tree)</span> Index NLJ</td>
<td>$R \bowtie_{INL, c}$</td> <td>$R \bowtie_{INL, c}$</td>
<td>$|R| \cdot (\log_{\mathcal I}(|S|) + \frac{|\sigma_c(S)|}{\mathcal P})$</td> <td >$|R| \cdot (\log_{\mathcal I}(|S|) + \frac{|\sigma_c(S)|}{\mathcal P})$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr>
<td>(Hash) Index NLJ</td> <td >(Hash) Index NLJ</td>
<td>$R \bowtie_{INL, c}$</td> <td >$R \bowtie_{INL, c}$</td>
<td>$|R| \cdot 1$</td> <td >$|R| \cdot 1$</td>
<td>$O(1)$</td> <td >$O(1)$</td>
</tr> </tr>
<tr> <tr >
<td><span>(In-Mem)</span> Aggregate</td> <td><span >(In-Mem)</span> Aggregate</td>
<td>$\gamma_A(R)$</td> <td>$\gamma_A(R)$</td>
<td>$0$</td> <td >$\textbf{io}(R)$</td>
<td>$adom(A)$</td> <td >$adom(A)$</td>
</tr> </tr>
<tr> <tr>
<td style="font-size: 90%">(Sort/Merge) Aggregate</td> <td style="font-size: 90%">(Sort/Merge) Aggregate</td>
<td>$\gamma_A(R)$</td> <td >$\gamma_A(R)$</td>
<td>[Sort]</td> <td >[Sort]</td>
<td>[Sort]</td> <td >[Sort]</td>
</tr> </tr>
</table> </table>
<ol style="font-size: 50%;">
<li>Tuples per Page ($\mathcal P$) <span> Normally defined per-schema</span></li>
<li>Size of $R$ ($|R|$)</li>
<li>Pages of Buffer ($\mathcal B$)</li>
<li>Keys per Index Page ($\mathcal I$)</li>
<li>Number of distinct values of $A$ ($adom(A)$)</li>
</ol>
</section> </section>
</section> </section>