Alright, so me and Aria are back at Idykmatic Nomadix VanBuild 2017, today's going to be a little bit different kind of video because there are possibly two different people I'm going to speak to and they have very interesting stories. One of them is this gentleman right here. So everybody, this is Bob, Bob, where are you from? I'm from Maine. And this beautiful school bus behind you is home? This is home, I've been in it for about a year now, this is my second year in it. I had to take a few months off of radiation and stuff. Yeah, radiation four? I had stage four squamous cell carcinoma throat cancer. Doctor said I wasn't going to make it a year, I wasn't going to make it six months. Yeah, and how long goes that? I was first diagnosed in December 2015. Okay, so it's been longer than that? Yep. How are you feeling? Side effects and radiation was a little brutal, but I'm very fortunate to be here. I'm happy. Yeah. Yeah. Yeah. Love and life. That's good. So is that part of the reason you're living in the school bus? It actually is part of the reason I'm in the school bus. Life's too short.  I want to see a whole lot of stuff and I just travel around. I'm seeing as much as I can see. I pick up people that need rides, places, I find them on rideshare pages and stuff like that. I pick up people that are going to certain places. I pay it forward, I'm lucky to be alive and I'm going to help them out too.  That's what they call them.  It's kind of a derogatory term. They call themselves that. Yeah, so for those people who don't know, what kind of people are these? Dirty kids are younger homeless people and younger people that train hop and hitchhike all around the country and everything. Sometimes they get really taken advantage of. I like to be a safe place for them. Yeah. Where are you going at 4am tomorrow? I'm going to pick up somebody else that was in California and they're going to meet me in Quartz Lake and I'm going to bring them back here and they're going to travel with me for a while. That's amazing. How long do you think? Are you guessing? I don't know. It's probably four or five months. Four months, depends. Whenever they get tired, I'm going to go. Yeah, yeah. Is there a particular reason that you like to have people with you or do something good? Do you like companionship? Yeah, the company's good, but I'll pay it forward. I like to provide people with a safe place for a while. Yeah. Yeah. I've learned a lot picking up some called dirty kids. They're super tour guides, you know? Yeah. They've been everywhere. They're going to see a lot of stuff that you don't see. They've went out a lot of the really out of the way stuff that you didn't have no idea was there. Yeah, that's true. And what were you doing before living in the bus and things like that? I was a merchant man before my health got bad. I had four heart attacks. I died a few times and I'm really very fortunate to be here. Yeah. Now, when you say you've died a few times, what exactly does that mean? Well, I had a widowmaker heart attack that I waited 24 hours to go to the hospital for and they went and put a stint in my chest and I died. I was dead for three and a half minutes.  It was a weird feeling, you know? Yeah. So... Is there anything that you changed from before that experience to now? Do you have, like, a different outlook or anything? Oh, yes. It's definitely changed my life in a big way. I'm a lot less judgmental towards people because, you know, we never know what's going to hand you. You don't know what tomorrow is going to bring, you know? And I ain't no better than anybody else. And, you know, this experience, this whole, my health is really proving that to me. It showed me that I'm not any better, you know? Yeah. And I like to share that story with a lot of young people, you know? And hopefully, you know, what I do for them, they'll remember it and pass it on, you know? Yeah. What would you, if you had any advice to your younger self, what would you tell yourself? Do it now. Don't wait till later because you don't know if later's going to be there. If it's going... I'm leaving here. I'm going back to Targ's. I got to go out of my way two and a half hours, but I'm going to go over the Hoover Dam in the Grand Canyon. I could wait until I come back around again, but I don't know if I'm going to be able to come back around again, you know? But no, I could get hit by a truck tomorrow. Yeah, that's true. And are you medicating yourself as well? No, this is just... So I don't smoke cigarettes. Oh, I was just... I got through my... I treated my cancer with Rick Simpson Oil for quite a while, and it kept my cancer at bay for over a year. And I was going through Texas and he took all my meds away, and by the time I got back to Maine, I needed radiation because my cancer had spread so fast. Wow. But yeah, I was stage four before I went out on the road last time, and I was taking RSO and it just stopped the cancer dead in its tracks. It wasn't going away, but it wasn't growing. I mean, I could live with it. It wasn't a good thing, but I was living with it. Yeah. And when Texas took it away, my cancer grew and it grew up into my brain.  So I needed to get radiation just to shrink it so it wasn't... so it wasn't so much pain. But I just told the doctor, I said, at this point, if I'm going to get radiation, let's go for growth. And he said, it's not going to cure it. Yeah. And four weeks after I ended the radiation, I mean, went back and there were still two spots. He said, I told you it's not going to get rid of it. And I went back four weeks later and my doctor, like a kid in a candy store, he can't find any of it. He said, I really think it's gone. Wow. So I got to wait a little while longer for another PET scan until the burns from radiation go away. All right. Because they show up with cancer on that PET scan. Yeah. I think I already know the answer to this, but would you prefer a hospice or the short bus by yourself or with friends? The road. Yeah. The bus and the road and people like this.  And why is that? It's real life. It's real life. Hospice is real dying. This is real living.


3. I came for the salvation of the world. Here is a thought from which all arrogance has been removed, and only truth remains. For arrogance opposes truth. But when there is no arrogance, the truth will come immediately and fill up the space the ego left unoccupied by lies. Only the ego can be limited, and therefore it must seek for aims which are curtailed and limiting. The ego thinks that what one gains, totality must lose. And yet it is the will of God I learn that what one gains is given unto all. Father, your will is total, and the goal which stems from it shares its totality. What aim but the salvation of the world could you have given me? And what but this could be the will myself has shared with you? Amen.


Now we move on to query processing, so however query is processed, this is a typical path for a query, first it is parsed and translated into typically relational algebra or some variant of relational algebra, somebody was asking me you know why should students learn about relational algebra, because that is the underpinning of any relational database system, you write your query in SQL but it is translated into relational algebra or some variant of relational algebra and then there is an optimizer, now what is the role of the optimizer, usually there are many different ways of executing a given SQL query and the cost of different ways of executing it can vary widely, a stupid plan can take days or months or years whereas a good plan might take seconds or minutes, the difference can be mind-boggling, now in the old days before relational databases humans had to decide exactly how to execute a query in the old database system, that is a lot of work for the programmer and humans may not actually fully understand what is going on in the database and may choose a bad plan, one of the reasons relational databases took off is that they built an optimizer, which decides what is the best way of evaluating a given query, you specify the query declaratively, you do not give details of how to evaluate it, the system figures out the best way of evaluating it, so that is the job of the optimizer, in the main workshop I will talk a bit about optimization, in today's lecture we do not have time for this, I am going to skip optimization totally, but once you have done optimization you have an execution plan and then you actually evaluate it, this chapter, chapter 12 talks of this part, what are execution plans and how the operations are actually evaluated, chapter 13 talks of the optimizer itself, so like I said I am skipping chapter 13 here, I should also mention that all these chapters, chapters 10, 11, 12, 13, they have a lot of details, it is physically impossible for any one database course to start from the basics and cover all of this, so you should do one of two things, the way we do it here, we cover all the basics and then the last about one month of the course, we give a quick overview of the internals, we cover data storage, we cover B plus three indices, we cover a little bit about query processing, we briefly sketch query optimization, we briefly sketch what are transactions, we briefly sketch concurrency control, we very briefly sketch recovery, so students have an idea of what all these things are, they do not understand it in detail, but when they go out in the world, if they have not done the second course, that is okay, they at least have an idea, they can learn the rest on their own, but if you have a two course sequence in your university then you can split it between the two courses, okay, what happened here is we started with the two courses, the first was a core, the second was an elective, internals was completely in the elective, the core course did not even touch internals, or what we realize after some time is students don't take the elective, they only do the core course, and then they go out in the world not knowing anything about what is going on inside of a database, we realize that's a bad idea, so if the second course is an elective, do make sure that the first course covers the basics, I think a lot of universities have adopted this from what I see of our incoming M.Tech students, I think most, but certainly not all universities have done this, so if you don't follow this, please make sure that is done, if you can influence your university, okay, so now what is an evaluation plan? Okay, so first of all, let's take a query, which is find the salaries of all instructors who earn less than 75,000, it's a very trivial query, I just want to find the salaries, which are less than 75,000, so here are two ways of doing it, I can first project instructor on salary, meaning remove all the other fields, and then select sigma, salary less than 75,000, so first throw away the other fields and then find things which are less than 75,000, or I could do it the other way, first I throw away things which are greater than 75,000, keep only those which are less than 75,000, from those records I remove the other fields, okay, this is a toy example, a real implementation will do both of these together, it doesn't really matter, but assuming they are done separately, you have two alternatives, so an evaluation plan not only chooses amongst these alternatives, it also chooses how exactly to do projection, how exactly to do selection, so in the relational algebra of projection, duplicates are eliminated, how do you eliminate duplicates? We'll see that, you can use sorting or hashing, we'll see that, but that choice has to be made, the evaluation plan specifies the choice, it says do projection with sorting on these attributes to do duplicate elimination, that's part of a plan, so that's an actual operation, not a relational algebra operation, but a physical operation, so now we're not covering query optimization, but just to tell you what it is, the goal is among all equivalent evaluation plans, which generate the same result, pick one, but how do you pick one? You need a way to estimate how much time this will take, what is the cost of this plan, so all of this is based on a way of estimating costs of various alternatives, now how do you do cost estimation, that's covered in detail in chapter 13, which I'm not going to cover, but that is the underpinning for algorithms to choose between different plans, and cost estimation is done based on statistical information, which is stored in the database, like how many tuples there are, how big are the tuples, how many distinct departments are there in the instructor relation, and so on and so forth, and how do you estimate the cost, how do you define the cost first of all, one way to define the cost is how long will this query run, then so it is very difficult to exactly estimate how long a query will run, but there are some good proxies for the cost, so one is the amount of CPU time the plan takes, which can be estimated, the number of disk IOs that the plan requires, which is actually hard to estimate, because it depends on how much memory you have, but you can estimate, if you had zero memory or very little memory, how many disk IOs with the plan required, and use that as a proxy for the cost, it is not actually what will happen, but it is an estimate, and then network communication, so somehow you put all of these together, put some weights to this, and come up with a single number that is the cost of, estimated cost of the plan, so I am going to skip those details, I will just mention one thing, that the cost depends on two parts, the number of blocks transferred, and the number of seeks, so it turns out that today, disks are very fast at transferring data, they probably become a factor of 20 faster in transferring data than disk 15 years ago, or 10 years ago, they were, today you can get a disk transfer of 200 megabytes per second even up to that, whereas a while ago 10 megabytes per second was very high, so that has changed, but the seek time for hard disk has not changed much at all in the last 30 years, improved by a factor of 2 maybe, however today something else is happening, seek times have dropped drastically, why, not for hard disk, but why have seek times come down, no not indexing, for hard disk seek time is still very expensive, but people are using something else, some other technology with very low seek time, flash memory, called solid state disk, flash disk, whatever you call it, all of us use those pendrives all over, right, that's a flash memory, and on flash, unlike a hard disk, getting to a particular piece of data and retrieving it is very fast, now why don't we just throw away hard disk and plug pendrives into our computer, it turns out those pendrives are actually very slow at data transfer, they are not optimized for data transfer, however they are much slower than hard disk for speed of data transfer, so now there is solid state hard disk which are comparable to regular hard disk, magnetic hard disk in terms of the data transfer rates with a much slower seek time, in fact now the data transfer is going ahead of magnetic disk, and they have become cheap, they were there earlier but they are very expensive, today it's very cheap, in fact those of you who are using OSL, we bought those machines recently, so we had a choice of solid state disk of 64 GB, versus hard disk minimum was 500 GB or something, it turned out that solid state disk was cheaper than hard disk, of course hard disk is 500, this is 64, but we don't need 500 GB on those machines, nobody is storing data of large amounts on that machine, the data is coming off a NFS server, so we actually decided to buy the solid state disk and it's much faster, you know hard disk when you run out of memory there's a lot of thrashing, it's actually cheaper to buy solid state disk of somewhat lower capacity today than to buy a hard disk, and this is having a very significant impact on database systems, what is this impact? You can get, you know don't do anything, just change hard disk by solid state disk and your performance jumps sharply for many many applications, so today if you want to you know build a database system, you will probably go with flash, that's what has happened today in the real life, so in some sense the all these cost estimations based on very high seek times, they are becoming irrelevant for a class of database applications, in fact something funnier has happened, not only people moved to flash this, now for many applications people are saying everything will fit in memory, memory sizes have exploded, now it depends on the kind of data you have, you have big data it is not going to fit on in memory it's not going to fit on flash, forget it, are this still rule for big data, what about the rest of data which is not big data, let's say all academic and accounting records of IIT, no pictures, no scans or anything just the relational data, for IIT for the last 20 years how big is it, make a guess, IIT is a reasonably sized academic institution and all our data will comfortably fit today I think in about 6, 8 or 16 gigabytes, that's all, all of our accounting, academic grades, courses everything put together is something like say 16 gigabytes, it fits in memory forget flash it fits in memory, so for this kind of data the cost estimates here based on this 6 is probably a wrong way of doing things, so anyway these models evolve and Optimize PostgreSQL for example can will let you tune this relative cost, so if you are running on flash you can tell PostgreSQL this 6 are extremely cheap and it will choose a plan accordingly, so the database can be used as is more or less little bit of speaking will help it choose a good plan, every query will be associated with some cost when you execute the query, for some research purpose if I want to estimate the cost that is I don't want to execute the query, I want to estimate it first and based on cost then I'll decide whether I want to execute it or not, I didn't found any tool which gives me cost before executing query oracle, MySQL they give cost but after query is executed, in fact in the labs tomorrow you will be doing this, so all databases have a facility to explain a plan and that facility will actually show you the estimated cost without executing the query, they all use it internally for query optimization and once they have chosen a plan you can find it without actually executing it, so we will be doing that in the lab, so let me take questions little bit later, let me focus on the operators that we will be using, so first of all let's look at the select operation relation algebra, how do you implement it, I want to find all records with salary less than 75,000, the simplest way is called a file scan linear search through the file, so don't read the content of the slide, I'm not going to go into details, just read the stuff in blue or bold up here, the next one is an index scan, so if I want to find the record belonging to roll number, some roll number, I will use an index we just saw that's what indices are for, so the same query select roll number equal to 52 on student instead of scanning a much better alternative is to use an index, but sometimes it turns out that depending on what the condition is, whether it's a whether duplicates are present, whether the duplicates are clustered together in a relation or they are scattered in the relation, depending on all this, it may still be cheaper even though there is an index to go back to linear scan, so there are all these cost estimates, these are all cost estimates, forget the details, I'm going to skip it now, but the point is there are cost estimate depends on whether the index is primary, that is it's clustered on the key you're looking for, the relation is sorted on the key, not the index, the relation stored sorted on the key or is it not, if it is sorted then these are the cost estimates, I won't go into details and if it is secondary that the relation is not sorted on the key then the cost estimates will vary, so any optimizer will use these kind of cost estimates to choose whether to do a use a index or do a file scan and in fact PostgreSQL has a hybrid thing, I think this is a good point to mention this bitmap index scan, so when you have a secondary index, so let this conceptually represent the B tree, not showing the internal structures these are the leaves, so now I have a range query let's say which accesses all keys in this range and I want to fetch the record, well supposing this is a secondary index, the actual data is somewhere else, it's on disk divided into blocks, now let's say that this range looks like this one goes here, the next one goes there, the third one goes here, the fourth one goes there, the fifth one comes here, sixth goes there and so forth, it's scattered all over, let's say that in this range there are some 1000 records, which are scattered all over here, if I and let's say this is fairly big, maybe not 1000 with today's memory size is this 1000 maybe kind of okay, some large number, actually even 1000 let it be 1000, so now what will happen is I'm going to do 1000 random accesses on this file to fetch the records that I want okay, that can be pretty expensive, the alternative is to just do a file scan, read the whole file from scratch, forget the index pretend it doesn't exist, read all the records in the file and find those with the key in this range that we are looking for, so those are the two alternatives as per what we have seen, so depending on the number of records here it may make sense to use the index or to do the file scan, what if I am not sure how many records will be here, I have a key range, I don't know exactly how many records will be fetched, I'm not sure what to do, the optimizer cannot make a good choice, it will at some point it will toss a coin and choose between the two, not literally but it just picks one with incomplete knowledge of how many keys there are, so what Postgres has is a hybrid thing which gets the best of both worlds, so what it does is first it will find all these things and it finds these pointers but it does not fetch the records, what does it do instead it has a bitmap, one bit per page, data page, so the pages in the file containing the relation are numbered logically 1, 2, 3 so on, now this has one bit per page, now what it does is it first goes through all the leaf entries in this B plus tree, it finds the pointer and if a pointer is to the third page it goes to the third bit and sets it to one, initially all the bits are zero and so it takes one after another and sets the corresponding bits, so the remaining bits after that there will be some zeros, some ones, zeros and so forth, what have we achieved at the end of this, we have not touched the data, we have just scanned the leaf of the B plus tree and set bits corresponding to whether that page is mentioned here, if it's mentioned set the bit to one, all pages which are not meant pointed to remain at zero, so what is the point of this operation, now it goes back to the, this actual data, it now scans it potentially linearly but it can skip, so it says oh the first two pages are zero, I'll skip them, the third page is one, I will only fetch the third page, the next there are fourth pages also one, I'll fetch it, maybe the fifth, sixth and so on are zero, I'll skip them, then after that the hundredth page is one, I'll fetch that, so what has it done, it has not done random IO on this file, it has gone sequentially through the file but it has skipped pages which are not pointed to by anything over here, it has only fetched pages which are useful, so this has two steps, first it scans the index, it builds a bitmap, scan index, build bitmap, after that so this is one, two, the third step is scan relation using bitmap to skip pages which are not needed and once a page is fetched you will go through the records in that page to see which one satisfies the condition, so it's a hybrid algorithm, so this algorithm is called a bitmap index scan, it's not amongst those we have listed in the book, maybe in the next edition we may mention this hybrid algorithm but this is implemented in PostgreSQL and when we look at query plans in PostgreSQL many times you will see this, so what is the benefit here, supposing there are only five pointers here, you will only fetch five pages because only those bits were one, that's cheap, if there were a thousand records here which satisfied in this range, you will fetch a thousand pages but not randomly, you are fetching them sequentially which is much cheaper, so that's a hybrid algorithm which is in addition to whatever we have in the book, if the index is, so the question is will this problem, will this be used only if the index is not plus, yes that's correct, if the index is clustered then there is no need for the bitmap index scan, if the lookup is on a key, so there's only one record there is no need for a bitmap index scan, if PostgreSQL is pretty sure that you will only fetch a few records then also it won't do this but if it thinks you may fetch somewhat more, it doesn't know how many but somewhat more than two or three records then it will do this. Sir in special data we use KD trees for indexing, three types of trees to use, KD trees, core trees and R trees, in KD trees what, how do you actually do this? Can I bump that question off, even in the main course I won't really have time to get into all this. There is less description about it in the tech book also. So there is a lot of material available on the web, so if you're interested in that you can look it up but to give you a one-minute answer, a KD tree is like you first divide up the space in one dimension and then the next level you do it on the second dimension, the third level on the third dimension, so at any level there's a linear ordering based on that dimension alone, so you know if you don't know about it this will make no sense, so I don't want to get into detail, so let me not take that question now. Okay. You can take it offline. Can we sir? So yeah one last question. Sir this is regarding that multi-processing, so when you're multi-processing. Multi-processing. When you're talking about that what we can say is that performance evaluation and all. Yeah. If we are increasing the more than one project for example working with single processor based system as well as working with multi-processor based system. Yeah. Will it improve the performance as well as. Okay. So this is actually a question which leads to another aspect of query processing which is parallel processing. So there is a whole chapter on parallel processing which unfortunately we, this is a basic code so we don't have time for it but yes you can make use of, so even if you don't do parallel processing if you have an online transaction processing system. As it is all these database systems can handle multiple processes even if it is single core it supports multiple processes. Now if you have multi-core the processes can run in parallel. So you get parallelism for online transaction processing but if you run one query it will typically run on only one process. It will not benefit from multi-processing in the traditional query process. So if you want one query to actually execute in parallel across multiple cores then you need parallel processing and how to do that is described later. And in some sense when we are doing Hadoop, MapReduce in Hadoop we are doing parallel processing but that is for a specific task. Now if you give an SQL query and on a system which supports parallel processing the database will decide how to parallelize the whole thing and do it for you. You don't have to worry about it. You just specify what you want declaratively and the database takes care. Yeah the whole point of parallel processing is to reduce the query execution. Time for individual queries. Okay there is some other stuff again I am going to skip it. Let me jump ahead to sorting. I think all of you probably know about external sorting. So I am going to skip this. External sort merge, break it up into runs and then merge the runs. There are many optimizations which are all there. I am skipping it. So let's jump ahead to other operations which benefit from sorting. The first thing is join. So there are many ways of doing join. The simplest way of doing joins which is actually the fallback option in general is what is called nested loops join. And you all know what this is. Just a simple loop one inside the other. For each tuple tr in R, for each tuple ts in S, test the pair tr ts to see if they satisfy the join condition. If so add the pair to the result. This works with any arbitrary join condition. If you put crazy join conditions the database system will fall back to nested loops which can be very very expensive as you can imagine. If you have million tuples in each relation you are dead. Million times million. It's horrible. So you generally don't want to do this and you want more efficient algorithm. By the way some terminology the outer relation this one R here is called outer and S is the inner relation. Now when I talk of nested loops join I normally mean the full nested loops join. But when you look at query plans in optimizers many times I will say nested loops at the top level. But inside it is not plain nested loops it is index nested loops. What is index nested loops? The index nested loop the basic idea is the outer level is the same as here. The inner level instead of taking every tuple T as in S I already have one particular R tuple. Let's say the join is on a particular attribute R dot A equal to S dot A. So it is on A. I have a particular R tuple. I have a particular A value in that R tuple. Now I will use the index to go and fetch the matching S tuples. There may be more than one but I can use the index to fetch matching S tuples. So in the index nested loops join this part the for loop on S is replaced by an index lookup. I do not have a figure for it but the idea is very simple. And when you look at query execution plans they may say nested loop and then if you look at the inner relation it will say index lookup. That is the clue that this is an index nested loops join not a plain nested loops join. Do not look at the plan and get scared saying hey the optimizer is doing full nested loops is very expensive. No. Use index nested loops join is usually much more efficient than plain nested loops. Then the next algorithm is the merge join. Intuitively very simple algorithm. If I joining R and S on the attribute A1. For example here I will sort both of these on attribute A1. And now I do a merge. I have a pointer here and a pointer there. If I look at the A1 values they match right. So that pair will be output. Next what do I do? I will move the second pointer here. The next point is B in no longer matches. If there were two tuples with this A there they will get output. In fact yeah. So it will come to D and I will show you another point there. But now what happens is this is moved to B. This is still at A. So this is lower. I will move this also to the next one which is B. Now again they match I will output the pair. Now again I will move this one C greater than B. So again I move this D. D and C do not match which one is smaller C. I will move it here D. Now they have a match I will output it. Then I will move this B1 forward to M. It does not match. But now I will come back here and say the next one. Oh D this is the same as before. So now what do I do? I will actually restore this pointer to the D which I was just that. And this second D will match this D and output a tuple. After which again I will move this forward to M and this one will move forward to F does not match which is smaller F. I will move it forward. Now MM match. Now I will move M forward there is nothing here. This M I move forward. This is Q. This is over. It is at M over. So I have merged the two relations to join them. So this is a very efficient way of joining relations. In one scan of R and S maybe a few backtracking because of duplicates. Other than duplicates it is a single straight scan of each relation very efficient. So that is merge join. Any questions? So this is widely used. The only cost is I have to sort before I can do merge join. So the sort is expensive. The merge join is cheap. Again there are cost estimates of all of these. Again I am going to skip all that. And now come to hash join. So what is the goal of hash join? So let us first don't read the slide. Let us first take a very simple case. Supposing I have one large relation and one small relation which easily fits in memory. What would be a good way of doing this join? I don't have indices. I have one small relation which fits in memory. Oh by the way I should mention that all of these work for other than the nested loops. These things sort and hash and so on work only for equi joints that is the condition has to be something here equal to something there. With more complex conditions they can't be used. It can be this equal to this and that equal to that. That is fine. But if you say this less than that the sort can still be used but hash cannot be used. And if you have other complex functions then they can't be used. For example if I say that I have a geographical coordinate on the first relation and a geographical coordinate in second relation. If I say distance between the two is less than 5 kilometers. I can't use these. I can't sort them in any meaningful way. I can't hash them. One fallback is to use nested loops join. But for the special case because this kind of spatial join is very important other techniques have been developed for spatial joints which use spatial indexing R trees and so on. So we can do an index nested loops join with an index which supports the function. Find everything which is less than 5 kilometers from this guy. And if the index supports that you can use index nested loops join. When you don't have an index the fallback is nested loops. But now we are focusing on equi join. So let's stick with that. Any questions? Okay. Now how does, so coming back to the question. I have one relation which is large, one which is small. So the most efficient way of doing this join is to load the small relation into memory and build an index on the joint corner. In memory index. What kind of in memory index are most efficient? Usually a hash index is very good for these kinds of tasks. I don't need a range scan here. So I'll build an in memory hash index on the small relation and then scan the large relation, match it, each tuple in that I'll do index. Look up find tuples and output it. So what have I done? I have done index nested loops join. But after building a temporary index on the smaller relation. So I can do dynamically create an indices with index nested loops join. That's possible. Hash join generalizes this idea. What if the other relation is not so small? It doesn't fit in memory. What can we do? An idea is as follows. I'm going to break up both relations R and S in such a way that the partitions of that second relation S are small enough to fit in memory. That's a basic idea. So how do I partition? I will compute some function, a hash function on the join attribute. And I will use the same hash function on R on each join attributes and on S on each join attribute. So what does a partition function do? Hash function. Given a tuple, the hash function will give a value between 0 and 4 in this example. And so I'll take the first tuple, compute the hash function on the join attributes only, and it gives me one. So I will put the tuple in this partition R1. The next tuple gives a value 0. So I put it in R0. So all the tuples that have a hash value of 0 fall in partition R0. Similarly R1, R2, R3, R4. So I go over R and break it into pieces and store them in separate parts. That's the first step, partitioning of R. The second step is to partition S using the same hash function. You can't use a different hash function. It has to be the same one. So now we have partition S also. Now I'm going to choose this number of partitions. I've chosen 5 here. I chose it such that there's partitions are likely to fit in memory. Why do I say likely? It's all hashing. There could be some worst case scenarios where all of them map to one value, then that won't fit. Then I'll deal with it later. But it's unlikely. In most cases, you know, if the relation is, let's say, 4 times the size of memory, I'll break it into 5 pieces. Then with high probability, each of the pieces will fit in memory. If I break it into 4 pieces, one of them is likely to overflow. If I break it into 5 pieces, it's likely that all of them will fit in memory. So the first step is partitioning. The second step is to load S0 into memory, build an index, and then take each R tuple in R0 and probe. The important thing to note here is that a tuple in R1 cannot match any tuple in S0, S2, S3, S4. It can only match tuples in S1. Why? The join attributes have to be the same. The hash function is on the join attribute, not on anything else. So if the tuples match on the join attributes, their hash values from both sides should match. So R1 only has to be matched with S1, R2 with S2, and so on. That's the key idea. So once I've done the partitioning, I can finish up the join using a dynamically constructed hash index. Index, that's a good join on that. So that's the idea of hash function. Some terminology, S over here, this one, on which I build the index, it's called the build relation, because I'm going to build an index on it. The other relation, R and R example, is called the probe relation. Why? I'm not building an index on it. I'm using those tuples to go into the index and look up this tuple. So I'm probing the index. So build and probe relation. So that's, I forget all the other details in the slide. I think I've explained it. And I also told you that if it's four times the size of memory, I use five. Why the five? It's a heuristic. So the fudge factor. If the thing is n times memory, I'll choose, let's say fudge factor is 1.2, 1.2 times the, that to find out how many partitions. So that, that is it for join operations. It's actually very simple. So it turns out that there is sorting, hashing, and then index, then nested loops join. For, what about other operations? Join is the most important. Select is also one, you know, that is also very important. These are the two most important operations. But there are others. If I say select this thing, what do I want? No duplicates. How do I remove duplicates? Very easy ways to sort. And then all the duplicates should be adjacent. I just compare with the next, next record. Throw away duplicates till I get a new record. Very easy. Now, one of the important things to note is all the algorithms which we have seen so far handle relations which can be much larger than memory. This is the key thing with databases. They do not insist that the stuff fit in memory. They can handle much larger data and work efficiently in spite of that. So sorting is with external sort. It's very efficient.  It is in turn efficient. But there is another way. I can use hashing, hash partitioning. How does that work? I partition R into some number of pieces, right? So supposing a relation is 5 times memory, I will partition it again with some fudge factor into pieces. But based on what? What is the hash function on? No, there's no joining. I'm removing duplicates. Yeah, you can do it on any one attribute, but you might as well do it on all attributes. So I can just hash on all attributes. So duplicates should land up in the same part. That is the key. Same bucket. And I'm going to break it into enough pieces that each piece is likely to fit in memory. And then I load it in memory. I can sort or I can build a hash index and probe. And if it's a duplicate, I throw it away. If it is not a duplicate, I add it to the index. So I can do duplicate elimination using hashing also. Projection is basically this duplicate elimination. What about aggregation? Group by and sum count, whatever. How do I do that? What is the goal of group by? I want to compute an aggregate on all tuples in a particular group. So my goal is to bring the tuples of that group together. That's my goal. So how do I bring tuples of a group together? I can use hashing, but let's start with sorting. The simplest way is sort. Sort on what? On the group by attributes. I have to sort on all the group by attributes. Okay? So if I sort on all the group by attributes, I'm guaranteed that all members of the group will be contiguous. It won't be that I have one member of a group here and then a member of some other group and then another member of the same group. So if I sort on the group by attributes, I can just scan once straight down. I'll see one group. The next few tuples may be in the same group. So I'm computing some. I keep adding up count. I add up the count. Average, what do I do? I just get the sum and the count. When I finish the group, I'll divide some by content or put the average. Similarly, other aggregates. When I come to the first tuple of the new group, the previous group is over. I'll output the result. Now start a new group and continue this. Very simple. Sort. Once scan, group by aggregation is done. Okay? Of course, if you are asking for more complex things like median, it's a little trickier because you have to also maybe sort on the attribute on which you compute median. Let's not get into that. For the basic sum, min, max, count, average, standard deviation also in there, all of them can be done with a very simple single scan. That's one alternative. Now, there's another alternative which works very well if the number of groups is small. This can happen many times. You have a very large relation, but the number of groups is small. What I'll do is I'll build a hash index. Hash index on what? On the group. Okay? I take the first tuple, I hash it, go into the hash index and what do I store in there? Let's say I'm doing sum. This is a new group. So the sum currently with the first tuple is whatever the attribute value is there. Now I take the next tuple, I look up the hash index to see if its group by entry is there. If it is there, what do I do? Add it to the sum. If it is not there, what do I do? Create a new entry. Okay? So I repeat this for each tuple. I will look up the index. If it is there, add to the sum, add the count, whatever else. If it is not there, create a new group in there. How many entries are there in the hash index? One per group. So if the number of groups is small, this will fit in memory. It's very efficient. One single pass on data, no sorting, nothing done. Very, very efficient. However, if the number of groups is large, it's more than, like, can fit in memory, there is a problem. Okay? The hash index will fill all of memory, then what to do? So if you, so what some databases will do is try to estimate how many groups there are. If the estimated number of groups is small, they will use this algorithm. If the estimated number of groups is large, they will first partition on the group by attribute and then run this algorithm in each partition. Now, of course, your estimate may go wrong. You thought it will fit, but it didn't. Then there are ways to handle it. Add up to that. I won't get into details. But anyway, so it turns out both sorting and hashing can be used, either can be used for aggregates and depending on the cost estimate, you would choose some of these. There are different situations where each of these makes sense. No? So here, you wouldn't, so extendable hashing is for hashing on disk. Here we are not doing hashing on disk. Our goal is in-memory hashing. So we won't use extendable hashing. So extendable hashing is for disk-based hashing. Now in-memory is extending the hash table entries is very cheap. It's done routinely. So we don't have to worry about that. If you use a Java hash map or a C++ standard lives hash map, internally they take care of all this. They will initially have a small array. If there are too many entries, they will split and extend the array. They will take care of it. If it were disk, then it's a lot more difficult to deal with extending the array on disk. But this whole business of hash storage, I skipped it totally, right? I just said B++ tree is nothing else. The reason is that hash, including extendable hashing and so on, people didn't find any significant performance benefits and it gives fewer features and concurrency control is a, again, you have to deal with recovery concurrency control. All that has to be dealt with for that. So then they decide it's not worth doing it and all databases that I know have given up on it. So today B++ tree rules. Postgres used to support it but it no longer maintained. Oracle, I think, may still support it but they also don't encourage it. Okay, set operations, union intersection is actually very similar to join. We can do merge hashing. I won't get into the details. Outer join. Outer join can be done by modifications of merge join. In merge join, what do you do? You compare. If it matches it outputs. What about outer join? If it matched, at least one, no change. If it didn't match any and it is on the preserved side, left outer join is a left input. Didn't match any right input. You output it with null. Similarly for right outer join, full outer join, whatever. It's very easy. So merge join is very, very easy to extend to implement outer join. What about hash join? For the probe relation, it's actually very easy. So if it's left outer join on the probe relation, being the left, I probe, I don't find a match. What do I do? Immediately output it padded with nulls. But if I want a left outer join where the left input is a build input, what do I do? You see the problem. I'm probing using the other one. At the end, I need to know whether something matched this or not. If nothing matched this, so it is in the index. The tuple is there in the index. The other relation is being used to probe. If nothing matched it, I need to output it padded with nulls. If something matched it, I should not output it. How do I track it? Just keep one bit. In the index, keep one bit. So you probe the index to see if there is a match. If there is a match, set that bit. Otherwise the bit is zero. So I probe. If there is a match, set the bit. At the end, I will go through the entire index once, through all the entries. If the bit is set, forget it, skip it. If the bit is not set, output it padded with nulls. So it's actually very nice. So in one hour, I have been able to explain to you all the basic algorithms at a high level. That's very nice. Of course, there are a lot of details. There's a survey on query evaluation by someone called Good's grapher, who is considered the guru in this area. That survey goes on for like 70 pages. Just for whatever I covered in one hour, there's 70 very dense pages. And this is very old. It's 1993. And since then, more and more techniques have been developed. So if you redo that thing, that survey will probably be 300 pages. What I covered in one hour. So obviously, there's a lot of details there, which is very important because databases are very important. They underlie so many things. People put a lot of effort into optimizing all of these. So it's still an active area. For example, this bitmap index can. The idea has been around, may have been around. I don't know. But PostgreSQL implemented it maybe two, three years ago, four years ago. It didn't have it before. And it's a very nice thing. And I think even today some of the other databases don't implement something like it. So practically speaking, databases are still improving. New, very useful new features are still being added at the query evaluation level point.


Stevenson gets the 21-3 win over Alvernia tonight at Mustang Stadium. Glenn Clark with head coach Paul Cantabene. Coach, obviously the score is what it is, but what was your take away? The good, what were you happy about? What were you even disappointed by in a lopsided win? I think we just got it done, you know what I mean? So he's kind of tough to come out of Alvernia. He's trying to build a program that I have a lot of guys. So I just thought we had to kind of do what we had to do. I thought we were very workman-like. We got it done. We got a lot of guys into the game today, which is great. But you know, now we just know it's another game down. Now we just focus on next week in those games. We always just try to take one game at a time. But I don't think there's any one thing we did great, but I don't think there's anything we did really bad either. Here you have a pretty big game coming up. Coach, you brought up Gavin to chat with us tonight. I want to talk about both he and Daryl Curtis. There's this like California freshman connection that's kind of working with those guys. But in general, all of these, at the beginning of the season, we talked about all the many new faces you had offensively. How comfortable are you with where these guys are at this point into the years you get into maybe the biggest game of the season? Well, you know, all the games are big.  But I think our freshman doing a great job learning. I think it hasn't been as easy for Gavin as he thought it would be. He had a good fall. And then I think he got kind of into the season. The things didn't come as easy. Now he's kind of getting used to how to play college across and be a starting attackman and what comes with that. And I think him and Daryl are both just learning every day and getting better every day. What to do, where to be, how deep into the plane. I'm adjusting to that. So, you know, and it's, but they're great. They're great kids. They get along really well. And so we like those California kids. We got four more coming next year. So we're really happy about that. But I think those guys are just smart lacrosse players. And we like smart lacrosse players in their, in their lax heads. They just love playing the game. And so I think that works really well. And I think their teammates have really absorbed them and like them. And I think all of our offensive guys do a great job just complimenting each other. So that's what we really do a great job. I think offensively playing complimentary lacrosse. Building a pipeline from the West Coast. I understand not wanting to give it too much hype or too much, but, you know, we all know the significance of this game on Wednesday. What is it going to take? The recent history has not been great. What is it going to take in order to go there and get this win? Yeah, they've gotten us lately, but we got them a lot early.  And I think we're a very good team.  So wherever, you know, face-offs are going to be important. Goalie play always up the middle is going to be important.  So, you know, they got some really talented players we'll be ready for, and we have some talented players they're going to be ready for. So, but we got to do a really good job just understanding the basics and not over, not trying to be who we're not. And so if we can stay within ourselves and play complimentary lacrosse, like we've been doing, I think we'll be pretty successful. Obviously, winning face-offs, the way you've been winning face-offs, before I let you go, the ride tonight was kind of overwhelming. How much of that was what you guys were doing and how happy have you been with the 10-man ride efforts? I think we've done a good job all year. We've gotten better and better at that. It's something we've always done and will continue to do. But I think it really starts with the kind of our attack. Our attack has done a great job riding. You know, can't 10-man a ride if you don't have an attack that rides. So I think they've bought into that and done a really good job making it tough on teams and that's what we want to do. Spend a lot of energy, have them clear in the ball, and that's the way their defense gets a little more tired and then wear them down a little bit and we get more possession. So we've done a good job, you know, winning face-offs, scoring goals or losing the ball, riding it and getting it back and putting a lot of pressures on team over the last five or six games. So we hope to continue to do that. Coach, I always appreciate it. Congratulations. We'll see you next Saturday. Thank you very much.


Did you turn off your computer? Did you make a donation to watch me work wishing well? All those things. Good job, you guys. And thanks for working on it. I love watching your hands. That is the gesture of WTF, help me, help me. WTF, help me. If you're out there, help me. Yay, so that was the action part of the play. And this is the dialogue part of the play in which we answer your questions. We take your questions and we make up answers on the spot. Talking about your work in your creative process. And Anika, what is that tweet against? Now we are actually here on interwebs. Hey guys, if you're at home watching, we're sorry for the delay, but you can now tweet in your questions to watch me work SLP and use the hashtag HowlRound so we can track you on here. HowlRound. HowlRound. H-O-W-L-R-O-U-N-D. R-O-U-N-D. What a beautiful song. I think somebody already sang it. And I'm just from Texas, so she talks funny. And so am I. I talk funny too.  We don't talk about howl around here, right? Okay, anyway, so enough of that. What are some jokes about people from Texas? Any other questions? So I'm working on Anala right now. I'm best at like beginning and ends, but not the best at like the middle part. Yeah, I'm still going and I'm still pushing myself. I know not to stop, but I find that I am stark. Like, I wonder if I'm starting to kind of lose the drive that like I had in the beginning, just it within the story. So like what advice would you give to somewhere, you know, like me who's looking to kind of push through the middle and like kind of get that drive back into the story? Yes, yes. So have you ever, where are you from? Orange County, New York. Orange County, New York. That's up to the north. Yes, it's the most north that New Jersey transit will go. Fantastic.  Did you have a yard growing up? Yes. Did you have your... You had a mullet. Fantastic. Okay. And did you ever see anybody do laundry and hanging outside? But in Texas, see, we didn't have a washer and dryer. And so, but you've seen like pictures of people laundry on the line because that's what you use. So you know if you hang a sheet on the line, you put a clothespin here and a clothespin there and the middle goes like this. So you need that. Right? So what you can do is you can do that with outlining.  Why don't I just take it? Great. So you have, you have events, right? Do you have your outline on cards? Great. Okay. So what you can do is just, you want to stay active because sometimes you're like, you start, you have all the energy. Yeah. And then it's that middle bit, you know, that means that, that clothespin, right? So what you can do is you can take your outline just for the middle bit. So you don't have to do the beginning because you're good with that. The end, don't worry about it. Just the middle. And you can transfer two index cards. So you notice how it stood up when I said that? It was active. Right? Okay. Because this is like energy sinking, energy sinking, right? So we're active. So you transfer it to three by five index cards and you can flip them. You can think about your novel. So before you write your writing period during the day, you can say, okay, writing this scene, this scene, this chapter, this chapter, and this chapter. And it's active. So you can keep the energy into it, right? So it's not just a big word document, you know? You see what I mean? So you can do that. That's very helpful. So try that just for like the next chapter or something. And see if you have to break it down and do like lots of index cards for a chapter that's fine too. But you want to get it off that big word document and get it into something that's active and energetic. Okay? Look at that. Anybody else? How are you doing? Good. I'm singing when you are. How is it in the land of Apple? Christmas of the genius part, do you know? Ah, I'm sorry. Because it would be proud of you. That's fine. We won't tell where you were. What genius part? Did I say that? No. The secret between you and me. Just making conversations. Anybody have any questions? Samantha? Yes. Yes. I'm going to put a lot of setbacks. Okay. Act one is done great. Because the topic and what I'm trying to talk about, it's delicate. I'm just trying to figure out where to start act to. Because I'm trying to write about 9-11 and it's delicate. So I have my options. I'm looking at trying to write from the next year to the next 10 years. And now we're heading into year 15. I'm trying to figure out how to make it palatable to myself. Right. You know, I'm like, this works for me, but it's trying to make sense to other people. Because I'm a responder. So I'm trying to write about what we were all doing. Right. And there were times where it was funny. And we all were like, we're being disrespectful. But then they were all saying, you know, we lost this one. I mean, I'm working with people who are looking for, like, the father, the brother, the son. Right. And they were all like, no. He had this kind of sense of humor who would have found this funny. Right. You know, so I'm going from that. And I'm trying to honor the memories of the memories. And I want to be respectful, you know. So I'm just trying to, you know, figure that out.  You know, I think from, I have to figure out what works for me and I want it to, you know, be palatable. Right. You know, because it's history. Right. Right. There's a lot of, I was there. Sure. That day. Right. And I was there that day and nothing, what do you mean? A lot of the things that I've watched have been like, here's what happened and it's this day. Thank you. I saw this plane, I saw that plane. There's nothing really like six months later, you know, just sort of after the first week, I don't really see anything, you know, out anywhere that's written about what happened next. Right. Where people are a year later and where people are. Sure. I think that's, I mean, it's great, but it's kind of like I'm looking for example, you know, I'm looking for something and I'm just like, all right, you know, I'm just, I feel like I'm frozen. Right. That's, so that's the setback of, there's so much, I don't know where to start. There are a couple things, and listen to what you're talking about. Did everybody, here's Samantha, you're talking about writing a comedy about 9-11? Yeah, I mean, for lack of a better way to speak. Yeah. Great. It's good to start there and start by exact, as the first responder, you're writing a comedy about 9-11. It's good to say that. That's why I said it in the microphone to, you know, write. Right? Because it's good to say that, because what I heard and what you're talking about is not just that you're stuck and having, you're frozen, what you said, but the reason is why. You want to write something, but you're also wanting it to be palatable to people. And that's tricky. That's what we call writing over our shoulder. Making sure that all those people, the thousands of people who might come to our play, over the course of the next, or since the play, right, over the course of the next 80 years, will find it palatable. That's a lot of people you have to check in with. So I suggest you care deeply about them, but don't look at them. And save both your eyes for your work. So that's number one. That's why I said, I'll say again, you're writing a comedy about 9-11. That's you, what you feel, an authentic experience, right? It speaks to your authentic experience, and you're writing that. We're not going to ask, they like it, okay? We're going to focus on them by not focusing directly on them, but by focusing on the them that lives in you. You see the difference? So they're cool with it, if you can write the thing that's true. Okay?  Okay? Okay?  Okay, and so act two was like, I don't know what to do with act two, correct? Has since passed, which I found out in Googling him to say, hey, guess what? I was joking around about all the funny things, and you know, now he's gone, and I'm just, you know, he was very specific, this was one of the firefighters I worked with, and he was very specific about we have to find what's funny. Like he was like, we have to laugh every day, because otherwise there's no point in going on, and they won. That was his, you know, so, I think I'm just trying to figure out a place to pick up so that it's complete thought, so that 80 people in 80, you know, in 80 years it makes sense. No, we're not. Right, right, right. Nothing at all. For you, what's going to work for you? It sounds like this guy you worked with, this firefighter you worked with, is important to you. Can you include him in act two? Yeah, it's becoming clear to me that he wants to be in charge of act two, as I sit. Why are we having a fight? I think I just needed to say it out loud. He sounds to me like, he wants to be in charge of act two. So let him. There he is, wanting to be in charge of act two, and you're going to let him, because he's the guy, he's one of the guys, he's one of the people who was saying, we need to fight, we need to be able to laugh at this, otherwise, as he said, they win.  So you're going to be done next week or what? I hope so. You got a game plan.  He's in a place I've got to move him to a new place. But I would say, go forward. Don't go back to act one to fix it the better. You've got to go forward. And act one, put it on a post-it or whatever and stick it in your notebook and get to it later. Okay? Great job. Sounds great. What's the title? Do you have a title? Not yet. Okay. Good job. Good question. Anybody else? Yes? Remind me of your name? Sheena. I like Sheena. Like this. That actually inspired me for a question. There's a, not an act that I'm avoiding because I don't want it to come across as a victim. So I guess my question is what would you suggest when you're dealing with a topic that actually happened to you and is a very touchy subject.  Right. It did happen to me and it happens to a lot of women. Right. But I'm trying to find the trick where it's about, it's more of an experiential thing. What does that word mean, experiential? I could have made it up. I don't know. No, no, no. I heard it. I heard it. You, I love movies. What does it mean? Experiential. What does that mean? Experiential. It's the key But aren't we all connected to this? I googled it. Okay. It's involving or based on experience and observation. The experiential learning associated with X. The experience. Yeah.  I'm going to write about it. The challenge is I don't I don't want the topic to come from a victim position. Does that make sense? The topic is rape. Usually when people are rape victims, it's like, it's an unfortunate thing, but it should happen. It's just like the tsunami should happen. So for me, I know that I'm avoiding it because I haven't written it. I mean, I'm writing it, but it's just like, I'm not happy with it. So my thing is how do I like face that challenge? I guess, that's not fair to say how do I, what would you suggest? How do I, as long as it's not about my work. But it's just one of those, like it happened, it's unfortunate, but like how do I I don't think you could come victorious out of it, but it's one of those It's interesting. It's interesting, and I don't know Latin or Greek, but I can not go English. Victim and victorious, it's interesting. I did. Oh, I know. Yes, it is the answer.  This is amazing. So, but victim and victorious, right? I mean, they're not, they're probably not connected, but they kind of are in my mind. Well, they go so deep, which is basically, because now I'm interested, I'm interested because you want to write about a subject, subject of rape, did you say that? And you don't want to just write about it from the victim, victim. Am I very correct? Right. But there's a block, because I maybe I'm not there yet, or I just don't know how to... It's tricky. There's a couple of things. One, I think we as a company to refrain from what we think of victims.  I mean, they were the victims. Now in America, we tend to like hate the victims. Hate all the victims. I hear victims that we hate on you, but then no one wants to be the victim, and no one wants to take responsibility until we are. Instead of just saying, yes, this happened. So we have to, first we have to reframe what we feel about victims. Like, it was her fault.  Right? So we are and she'll never be able to do anything else except talk about this. Which is what also we feel about victims. And this is going to define her. So we feel that as a victim, and that's all they ever are.  Okay. So we need to reframe that first. And then I think once we do that, we can write about being the victim of a crime and not have it be fall into that slot with all these other things.  And it doesn't perform. That's what Hollywood says. Things are evolving like people don't perform, which means they don't make overseas. Okay. But it's just not interesting to it's not universal. So, we need to reframe what's universal and how. You see, we need to reframe a lot of things in order to tell an authentic story. Instead of just telling the stories, it's going to be palatable to the marketplace. You tell your authentic story and if it shows that you or that the subject was the victim of a horrible, horrible crime. I think through the authentic telling of it, you, we all are liberated to a new understanding. So, talk about it. Just start talking. You know what I mean? Just start talking and if whatever again Sure, just start talking. The way you figure out how to talk about it is by talking. The way you figure out act two is by jumping in there and going with it. That's the way and a certain point, there's all the stuff that needs to be done but at a certain point, you need to jump it. Flail around until it looks like swimming. You know what I mean? And that's all we ever do anyway. I mean some people like Michael Phelps. What's happening? He's going to be in the next film. He's amazing. Survivor. That was me stretching. We're mommy of your name. Hey Tolu, okay. Hi. I have like a lot of Okay. So, you just started writing or you just started writing this new piece that you're writing and you have a lot of characters and ideas and story ideas and interesting characters and they haven't sort of formed into a thing. Yeah, like I have something you have some what? Some scene. So they're forming. Bit by bit.  You keep going, you know. Bit by bit, you just keep adding to what you've got and keep following, you know, like oh, these two characters are in this scene together and they're doing this. You can talk to your characters. You can say, what are you doing here? What do you want? They're like ghosts. Hmm. They are.  What do you want from me? Right? And they'll say, I want to be in a play. You know, I want to be in a novel. You know what I mean? What can you do? What are you doing here? What do you want? They always want something or they wouldn't have shown up. They show up because they want something and you can help them get it. They want to be in a play or a novel. The characters are going to buy me one.  And you know, in either way it doesn't matter. Are we in a cell, a padded cell drooling or are we really happy today? And he said, makes no difference. And I thought that was really comforting so now. So I share that with you. So, you know, just keep going forward. You have a writing time. A writing time during the day. What's your favorite time of day? You're like the only person who's favorite time of day is five o'clock. So like now. So five o'clock is your favorite time of day. Great. So do you have the ability to make say from five to say five thirty or five to six o'clock your writing period every day or pretty much every day? So you can sort of put down whatever it is you're doing and sit down with your laptop or your notebook or whatever and spend thirty minutes a day that's all you need to do. Writing just newly. You don't care. You know, they might not have names yet. You can ask them, what's your name? Lady in the brown coat. You know what I mean? My name is Sheila. Yeah. But see, it's fun, right? It's like fun because they're like your friends.  We're grown up and we have imaginary friends. It's the same thing. Is that helpful? Do you think they start to turn into a thing? A story or whatever? What's your name? I forget your name. Jacqueline. Hi, Jacqueline. Welcome back. What do you think, Chris? When you get stuck. When you're stuck? That's good. Yeah, yeah. When you're stuck, when you're like stuck, it's time to outline. I like to outline before I get stuck. So I don't get stuck. Yeah.  Or it's time to change the litter box before the neighbors have come and go. You know, the same thing. So you change. You outline before you get stuck. So if you outline, it makes your heart go hmmm, hmmm, hmmm, hmmm, hmmm, hmmm, hmmm, hmmm. Yeah, so do it more often. Right? So now, today is great. Start now.  I need to get some. The staples. They're cheap, right? You can get a package of like a thousand. But you only need probably, you know what, 120, 10, 10, great, 10, 8 actually, maybe. In some practices, you can be a whole great player with 8. But anyway, go over the staples and get yourself some blank, blank on both sides or lines on one side. If you like college, whatever you like, move small, small, 3x5, right? And start today. And just write down the scenes as you see them. If you don't know the scene, don't worry about it. You know, you could just move screenwriting also. Playwriting, over it. Camp. Camp New York University. Camp New York University. For everyone that's happy. For everyone that's archery or whatever, I don't know.  If you don't know what's happening, just skip it and go on to the next scene. If you only know the beginning and the end, like you Adam, just write the beginning and the end. And then shake it around in the middle and it will begin to appear. Okay? So now, so outlining. And it's again, it's not this weird, like I said before, Roman numeral thing. Unless you're Roman. But the Pope. I'm sure the Pope outlines in Roman numeral. But, you know, it's not Roman numeral thing. It's not like an anally retentive thing. It's not a weird, what do you call it, thing to take the place of creativity. Now these people have weird outlining. It's just a way to like hang your laundry on a line without having it sag. And if it's hung well on a line and it dries better because the wind could blow through it. It's, you know, just so that's all we're doing on the bottom camera. So you're going to go to Staples, get some cars, start today. You know, write it in pen or pencil or your choice pen. You have a pen there. Great.   Hey, look at him. And it's fun. Then it's fun.  He was like a special thing. He felt like he didn't do that. Okay. We're going to tell you about next week. What are we doing? I'm just going to tell you about next week. Hey guys. Okay, so next week we are not having Watch Me Work next week, unfortunately. Because Head of Passes is opening here at the public next Monday. And they're having their opening night gala, so it's going to be happening up here. So we're going to not be here next week, but we'll be here the week after that, which is April 4th. So we will see you guys back here at five o'clock on the second floor of the public on April 4th. Okay. That's all. We can go on. We love you. Don't vote for you know who. I'll show you names. Because I'm June. June, that's right. Okay, I got it. I'm over. Okay.