Can anyone explain what index fragmentation is? I googled Index Fragmentation but couldn't find satisfactory answer.
What is Index fragmentation in Oracle SQL?
654 Views Asked by llecxe At
1
There are 1 best solutions below
Related Questions in DATABASE
- Can MVC.NET prevent SQL-injection at razor or controller level?
- Forgotten password reset page: should the user need to enter a username/email as well?
- Dynamic roles list in CustomAuthorize ASP MVC
- Access roles from multiple applications
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- Evernote Web Clipper and Content Security Policy
- Invalidate user credentials when password changes
- Spring Boot MVC non-role based security
- Correct Captcha behaviour on error
- Is macro more secure than static const if I don't want someone to know or change the hardcode value?
Related Questions in ORACLE
- Can MVC.NET prevent SQL-injection at razor or controller level?
- Forgotten password reset page: should the user need to enter a username/email as well?
- Dynamic roles list in CustomAuthorize ASP MVC
- Access roles from multiple applications
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- Evernote Web Clipper and Content Security Policy
- Invalidate user credentials when password changes
- Spring Boot MVC non-role based security
- Correct Captcha behaviour on error
- Is macro more secure than static const if I don't want someone to know or change the hardcode value?
Related Questions in INDEXING
- Can MVC.NET prevent SQL-injection at razor or controller level?
- Forgotten password reset page: should the user need to enter a username/email as well?
- Dynamic roles list in CustomAuthorize ASP MVC
- Access roles from multiple applications
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- Evernote Web Clipper and Content Security Policy
- Invalidate user credentials when password changes
- Spring Boot MVC non-role based security
- Correct Captcha behaviour on error
- Is macro more secure than static const if I don't want someone to know or change the hardcode value?
Related Questions in DATABASE-FRAGMENTATION
- Can MVC.NET prevent SQL-injection at razor or controller level?
- Forgotten password reset page: should the user need to enter a username/email as well?
- Dynamic roles list in CustomAuthorize ASP MVC
- Access roles from multiple applications
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- Evernote Web Clipper and Content Security Policy
- Invalidate user credentials when password changes
- Spring Boot MVC non-role based security
- Correct Captcha behaviour on error
- Is macro more secure than static const if I don't want someone to know or change the hardcode value?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Leaving all unrelated technical aspects aside; Fragmentation in context of a database is ordered data being stored in a non-ordered way. This causes unwanted performance overhead causing slowdowns for the database.
Say you have a table with employees. The index contains sorted data for accessing employees by their identification number. An index contains data stored in sequence. For simplicity reasons we have a table containing four employees:
A database engine stores a few employees in a page. This is typically a fixed sized sorted bucket. So let's put the employees in a page. Let's assume that we can only put two employees in a page. We'd end up with:
Now the problem rises when we want to add Bert with identification number 3. It doesn't fit in either page. Not at the end of page 1, or at the start of page 2. We need to create a new page for Bert, and fix the references of (previous and next) pages so that they're still ordered.
Note that page 3 is at the end of the list. The database engine can still start at page 1 and go through the pages in an ordered fashion; namely by going to the next page 3, and then to the next page 2. This isn't optimal however. The engine needs to jump back and forth in order to find it's data, instead of just walking from page 1 until the last page. This is exactly what index fragmentation is.
We can defragment the index by sorting (and rebuilding) the pages again. I'll spare you the specific steps, but the result of this, is that the pages are in-order and that the data it contains is ordered as well.
You might ask, why not do this right away? There's always a trade-off. Changing the least amount of data (in this case the pages), bothers the least amount of other users (in this case other queries or changes to the database). In the scenario where the new page is placed at the end, we only need to change a few pages. If we would update the index to be fully ordered, it would require changing most of the pages, if not all of them. While changing a page, other changes to the same page (or worse) have to wait for the former change to be committed.