‫So a full table scan is when you have a large table and you want to find a role in that table or a couple
‫of rows, not necessarily just one, in order to do that, you need to read the entire table.
‫Reading the entire table effectively consist of reading at page by page because what is a table, really?
‫It's it's a single data file on disk or could be multiple data files.
‫And then you need to ask the disk controller says, hey, give me this portion and then give me this
‫portion and then gives me this portion and that gives me this portion, these Porgera abortions, really
‫we can spend hours discussing this stuff.
‫Right.
‫If you are looking at the database, these portions are called pages.
‫And this is what I'm going to refer to them here now on pages, read a page, but the page has a fixed
‫size.
‫Some databases have variables.
‫Page size, like compulsories, is always 8-K by default, unless you recompile the source to be something
‫else, I believe, and device equals sixteen.
‫So when you do that, you read these pages one by one.
‫But what does it mean to read 8-K from descried that's could be translated to a single IIO.
‫But when you go to the desk there is bloks.
‫There are sectors in case of a hard disk drive that is physical as D page, which is a different side,
‫like I believe it's four K, so that that kind of plays into consideration and we got spent hours discussing
‫that stuff.
‫So it requires a lot of Io to read all this table and then go to the memory and then one by one read
‫this road and find out, oh, is this meital, this is my role.
‫Is this.
‫So we need a way to be able to reduce the search space.
‫That's the problem that we have here.
‫So let's take an example.
‫You're a fine person with ID five, and usually when you have the ID five, usually you don't care about
‫the value of five.
‫You want more information, right?
‫So you want to find idea five so you can pull the name, for example.
‫So in this case, you're going to scan all these raw rows until you find this during the scan, you
‫could have built one page.
‫You can have pulled a hundred pages until you reach that.
‫And the cost can vary with the amount of pages you read from this crime.
‫So if I'm going to search the worst case scenario for the pages that are always at the last right of
‫the record, and that doesn't necessarily mean anything, to be honest.
‫This statement, it can be incorrect and really depends on the DBMS solutions.
‫DBMS are not dumb even on the full table scan when they do that, when they have to do that, when they
‫have to skip the index, they do a smart thing.
‫They do threading, they split the tables in half and multiply that and they do multiple workers that
‫work from the bottom and from the up and they do all sorts of tricks to find the row as quick as possible.