<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shofiya2003</title>
    <description>The latest articles on DEV Community by Shofiya2003 (@shofiya2003).</description>
    <link>https://dev.to/shofiya2003</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F748103%2Ffd11632c-63f2-4b02-a930-cc1a7bc454ff.jpg</url>
      <title>DEV Community: Shofiya2003</title>
      <link>https://dev.to/shofiya2003</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shofiya2003"/>
    <language>en</language>
    <item>
      <title>CREWORK WEB DEV COHORT: MY STORY</title>
      <dc:creator>Shofiya2003</dc:creator>
      <pubDate>Wed, 28 Dec 2022 06:56:13 +0000</pubDate>
      <link>https://dev.to/shofiya2003/crework-web-dev-cohort-my-story-3p5g</link>
      <guid>https://dev.to/shofiya2003/crework-web-dev-cohort-my-story-3p5g</guid>
      <description>&lt;h3&gt;Our Project: NOTED&lt;/h3&gt;
&lt;p&gt;Over 8-weeks we together built NOTED- a chrome extension to take notes on YouTube without leaving the tab. We are launching our product on product hunt soon. Team NOTED was the best team to work with.&lt;/p&gt;
&lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2A7mVM7fI-teaanbkNnfTWtg.png" width="800" height="450"&gt;&lt;h3&gt;Final Words&lt;/h3&gt;
&lt;p&gt;For me, Crework was a new beginning. I wanted the cohort to never end but as they say, good things always come to an end, here we are. I loved working on the project, made some brilliant friends, and learned from the BEST mentors. At the end of the cohort, one step closer to my goal.&lt;/p&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedium.com%2F_%2Fstat%3Fevent%3Dpost.clientViewed%26referrerSource%3Dfull_rss%26postId%3D36a769384645" alt="" width="800" height="400"&gt;&lt;p&gt;This article is published w/ &lt;a href="https://scattr.io?ref=dev" rel="noopener noreferrer"&gt;Scattr  ↗️&lt;/a&gt;&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Indexing 101</title>
      <dc:creator>Shofiya2003</dc:creator>
      <pubDate>Tue, 27 Dec 2022 22:50:21 +0000</pubDate>
      <link>https://dev.to/shofiya2003/indexing-101-2nbe</link>
      <guid>https://dev.to/shofiya2003/indexing-101-2nbe</guid>
      <description>&lt;p&gt;Imagine, I give you a phone book and ask you to find me the phone number “Harry Potter” from it. What would you do? 🤔&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k2r6G0bB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/182onggu7ijfkn3nc2ay.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k2r6G0bB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/182onggu7ijfkn3nc2ay.gif" alt="Image description" width="220" height="161"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search every page of the phone diary for Harry’s number. ( I wish my phone book had Harry Potter's number but anyways!💔)&lt;br&gt;
Well, what if I give you a phone book with names that are alphabetically arranged? &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q4iQ3ky9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6m1b1v9xwh1uxk21chf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q4iQ3ky9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6m1b1v9xwh1uxk21chf.jpg" alt="Image description" width="600" height="900"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Switch to the page with names starting with the letter ‘H’. You can complete the task with lightning speed ⚡.&lt;br&gt;
The concept of indexing is pretty straightforward. Indexes are data structures that help in searching. To understand indexing, let’s see what a database engine does without indexing!! 😱&lt;/p&gt;
&lt;h3&gt;
  
  
  The world with no indexes!
&lt;/h3&gt;

&lt;p&gt;To find a record that satisfies a particular query a database engine does a &lt;strong&gt;full table scan&lt;/strong&gt;, which means it checks the entire row one by one. The full table scan is called a &lt;strong&gt;sequential scan&lt;/strong&gt;.&lt;br&gt;
However, databases have a way of making this sequential search faster even without indexing. Like, Postgres uses &lt;strong&gt;parallel sequential scan&lt;/strong&gt;, in which several workers together scan different range of rows in a table so that the full table scan is completed faster. 🤝&lt;br&gt;
A full scan on a table with billions of records will be a nightmare!!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9baIyKJb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mrn0u00wj7rz3o3yitvm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9baIyKJb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mrn0u00wj7rz3o3yitvm.gif" alt="scared" width="498" height="278"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Enters Indexing
&lt;/h3&gt;

&lt;p&gt;Indexes are created on a column/columns. An index is a data structure that directly gives the database engine the address of the rows that could satisfy the condition of the query, saving the time to scan all the rows of the table. With the address of the rows, the database engine then fetches the information needed from the disk by performing an &lt;strong&gt;I/O&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Remember ☠️&lt;/strong&gt; → The index just gives the memory address based on the key on which it is created. For example in a student database index is created on the column Id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT name FROM Student 
WHERE Id=5;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this particular query, the address of the row with an Id equal to 5 will be searched using the index, efficiently, but we will need to jump back to the disk to fetch the name from the row, using the address. This means the index is a different data structure and the table is a different data structure stored at different places. This can take I/O operations and hence can take time. 😰&lt;/p&gt;

&lt;p&gt;To know more about disk and RAM storage  → &lt;a href="https://kb.iu.edu/d/ahtx#:~:text=Each%20is%20used%20for%20a,%20refer%20to%20hard%20drive%20storage.%20%F0%9F%A5%B8"&gt;Read More&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Index Scan and Bitmap Index Scan
&lt;/h3&gt;

&lt;p&gt;If the database uses an index for a query it uses an &lt;strong&gt;index scan&lt;/strong&gt; to search for a record.&lt;br&gt;
For every row address found from the index, the engine jumps to the disk for the row information to the database. This can take a lot of I/O’s.&lt;br&gt;
To make this easy to understand, let’s say you went to a supermarket with your father 🛍️🥖. Your father stands near the gate and orders you to find the item and bring it to him one by one. This takes a lot of time. ⏱️&lt;br&gt;
So, instead, you make a list of items and bring them all at once. 🤓 &lt;strong&gt;Bitmap Index Scan&lt;/strong&gt; works similarly.&lt;br&gt;
Using a simple index scan it finds the addresses it needs to fetch, and then jumps to the disk to get the data in bulk. This&lt;br&gt;
takes a lot less I/O’s.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PsQqLK2V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spseyj8vuhsp5cml5nk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PsQqLK2V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spseyj8vuhsp5cml5nk4.png" alt="Bitmap" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you like the article do give a 💜&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Part 2 of Indexing 101&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-key columns&lt;/li&gt;
&lt;li&gt;Composite Index&lt;/li&gt;
&lt;li&gt;How are index stored&lt;/li&gt;
&lt;li&gt;Does the database always use index? 🤔&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Along with query analytics&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stay Tuned 🥺 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AqHo3lO9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uga3oyabvtbs8ve4iytf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AqHo3lO9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uga3oyabvtbs8ve4iytf.gif" alt="Excited" width="498" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>computerscience</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
