<?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: NightBird07</title>
    <description>The latest articles on DEV Community by NightBird07 (@nightbird07).</description>
    <link>https://dev.to/nightbird07</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%2F1059050%2F8e92871f-09ed-45aa-8186-0c1a2ad6cd90.png</url>
      <title>DEV Community: NightBird07</title>
      <link>https://dev.to/nightbird07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nightbird07"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Sun, 11 Jan 2026 20:56:37 +0000</pubDate>
      <link>https://dev.to/nightbird07/-176c</link>
      <guid>https://dev.to/nightbird07/-176c</guid>
      <description>&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420" class="crayons-story__hidden-navigation-link"&gt;Rediscovering the Joy of Software through Open Source&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/nightbird07" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1059050%2F8e92871f-09ed-45aa-8186-0c1a2ad6cd90.png" alt="nightbird07 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/nightbird07" class="crayons-story__secondary fw-medium m:hidden"&gt;
              NightBird07
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                NightBird07
                
              
              &lt;div id="story-author-preview-content-2444571" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/nightbird07" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1059050%2F8e92871f-09ed-45aa-8186-0c1a2ad6cd90.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;NightBird07&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Apr 29 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420" id="article-link-2444571"&gt;
          Rediscovering the Joy of Software through Open Source
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;6&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;




</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>ai</category>
    </item>
    <item>
      <title>Rediscovering the Joy of Software through Open Source</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Tue, 29 Apr 2025 06:30:27 +0000</pubDate>
      <link>https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420</link>
      <guid>https://dev.to/nightbird07/rediscovering-the-joy-of-software-through-open-source-1420</guid>
      <description>&lt;p&gt;In the rapidly evolving world of AI, it often feels like everything is getting blurred—students are losing their focus, and with it, the joy that comes from the journey of failing and eventually succeeding. Not long ago, the path to becoming a better software developer was clearer: curated roadmaps, classic recommended books, structured learning approaches. But now, the global focus has shifted. The fear of being replaced by AI overshadows the intrinsic motivation to improve.&lt;/p&gt;

&lt;p&gt;Let us remind ourselves: the purpose of AI is not to instill fear, but to inspire us to become even better. Today, I want to talk about something we all crave but sometimes lose sight of—&lt;strong&gt;the joy of building&lt;/strong&gt;, the &lt;strong&gt;feeling of proficiency&lt;/strong&gt;, and how &lt;strong&gt;open source&lt;/strong&gt; can reignite that passion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source is Difficult—And That’s the Point
&lt;/h2&gt;

&lt;p&gt;No one can deny it: open source projects are hard. Behind every repository is often a masterpiece that took years of iterations, architecture decisions, rewrites, and community collaboration. These projects aren’t always straightforward. Sometimes they diverge from common patterns to prioritize clarity or performance. You might ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If open source is so difficult, what can I possibly do about it?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To answer that, let me tell you a personal story.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Journey: Reinventing the Wheel and Hitting Walls
&lt;/h2&gt;

&lt;p&gt;I love &lt;strong&gt;recreational programming&lt;/strong&gt;—which for me means reinventing the wheel. It’s my way of learning deeply. One day, I challenged myself to build a torrent client. Things were going well until performance issues emerged. My application couldn't keep up. So I ventured into &lt;strong&gt;multithreading with Go&lt;/strong&gt;, revisiting multiple chapters from &lt;em&gt;Concurrency in Go&lt;/em&gt; to refresh patterns and avoid common pitfalls.&lt;/p&gt;

&lt;p&gt;Yet, my program remained sluggish. That’s when I turned to open source—not to copy, but to &lt;strong&gt;observe and compare&lt;/strong&gt;. How did others do it? Could the problem I’m facing already be solved elsewhere?&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source Saved Me
&lt;/h2&gt;

&lt;p&gt;I was lucky. I found an actively maintained torrent client written in Go. As I dove into the codebase, something clicked. I could actually understand it. Not every single line, of course—but I saw the reasoning behind the structure, the flow, the function choices. It was like reading a story you’ve already tried to write.&lt;/p&gt;

&lt;p&gt;That’s when I realized: this is the entry point to building anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The New Workflow: Build, Test, Read Open Source
&lt;/h2&gt;

&lt;p&gt;Here’s my new mindset:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Build something yourself&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test it thoroughly and reflect&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Then read open source projects&lt;/strong&gt; doing the same thing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By the time you reach step 3, you’re no longer a passive reader. You’re an explorer. You’ve felt the pain, made the mistakes, and you’re equipped to understand what you're reading.&lt;/p&gt;

&lt;p&gt;This approach can be summarized as:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Become the user of the system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Make mistakes — even be overly critical if needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Manually write as much code as possible before automation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Open Source is Still Difficult—But Now It’s Worth It
&lt;/h2&gt;

&lt;p&gt;Even after these steps, you’re not guaranteed access to the inner circle of any project. But you &lt;em&gt;will&lt;/em&gt; gain a faster, smoother understanding of codebases and architecture. You &lt;em&gt;will&lt;/em&gt; be able to make meaningful pull requests, open thoughtful issues, and join discussions.&lt;/p&gt;

&lt;p&gt;As a student, you might not always have access to a senior developer or mentor. So create your own path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Be curious&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Think deeply and patiently&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Allow yourself to fail multiple times&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reach the point of giving up, then try again&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, read the solution in open source. You’ll think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Wait, I did this too!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that moment of self-validation is powerful. It keeps you going.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools That Still Matter (Even in the Age of AI)
&lt;/h2&gt;

&lt;p&gt;Many tools are no longer talked about because of the AI boom, but those who truly value open source and learning still use them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/MunGell/awesome-for-beginners" rel="noopener noreferrer"&gt;Awesome for Beginners&lt;/a&gt; — curated beginner-friendly projects&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.codetriage.com/" rel="noopener noreferrer"&gt;CodeTriage&lt;/a&gt; — get issues from real projects in your inbox&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://up-for-grabs.net/#/" rel="noopener noreferrer"&gt;Up for Grabs&lt;/a&gt; — discover issues tagged as good first contributions&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;In conclusion, open source isn’t just code—it’s a &lt;strong&gt;conversation&lt;/strong&gt;, a &lt;strong&gt;mirror&lt;/strong&gt;, and sometimes even a &lt;strong&gt;mentor&lt;/strong&gt;. You don’t have to wait for permission to get involved. Start by building, keep failing, and then read the source code of those who walked the path before you.&lt;/p&gt;

&lt;p&gt;That's how we rediscover joy in this AI-driven era.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Build something. Break it. Then see how others fixed it.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>ai</category>
    </item>
    <item>
      <title>Index Optimization in Database Query Performance: Guidelines and Real-world Examples</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Mon, 11 Sep 2023 18:59:56 +0000</pubDate>
      <link>https://dev.to/nightbird07/index-optimization-in-database-query-performance-guidelines-and-real-world-examples-4f80</link>
      <guid>https://dev.to/nightbird07/index-optimization-in-database-query-performance-guidelines-and-real-world-examples-4f80</guid>
      <description>&lt;p&gt;Don’t get too smug with your current level after reading a ton of articles (especially, mine) because today, I am going to throw some curveballs at you and if you can hit them all, then you are truly a geek and you deserve a party popper. In the world of database query optimization, the choice of indexes can make or break your queries. This article reveals the secrets of picking and tweaking indexes, supported by real-world examples. We’ll talk about situations where the right index can make your query fly and when it might need a makeover.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Recap on Index Optimization:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;And I know you are looking for a cheat sheet, so here is one that could jog your truly brilliant memory when you were diligent. Here’s a crisp recap of key index concepts that can help you nail the questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single-Column Indexes:&lt;/strong&gt; An index on a single column is effective for filtering data based on that column's values. For example, creating an index on a &lt;code&gt;date_column&lt;/code&gt; with the current data-- case sensitive,can accelerate queries that involve date-based filtering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Column Indexes:&lt;/strong&gt; In scenarios where queries involve filtering by multiple columns or sorting by one column, a multi-column index can be advantageous. It optimizes both filtering and sorting operations. For instance, an index on &lt;code&gt;(a, date_column)&lt;/code&gt; works well when filtering by &lt;code&gt;a&lt;/code&gt; and sorting by &lt;code&gt;date_column&lt;/code&gt;(ordere matters).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Purpose Indexes:&lt;/strong&gt; Sometimes, a single index can serve multiple query patterns. If you have queries filtering by different combinations of columns, a multi-column index that covers all relevant columns, such as &lt;code&gt;(a, b)&lt;/code&gt;, can be beneficial for optimizing these queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pattern Search Indexes:&lt;/strong&gt; When performing text pattern searches, consider using specialized index types like &lt;code&gt;varchar_pattern_ops&lt;/code&gt;. These indexes are tailored for efficient pattern matching, as seen in the 'text LIKE' query.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Impact of Conditions:&lt;/strong&gt; Introducing additional conditions to a query can affect its performance. Whether it makes the query slower, faster, or keeps it the same depends on the specific data and query. Evaluating these changes is essential for efficient indexing.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;for each question you have to choose &lt;br&gt;
1- &lt;strong&gt;Good Fit&lt;/strong&gt;&lt;br&gt;
2- &lt;strong&gt;Bad Fit&lt;/strong&gt; -- could be optimized. &lt;/p&gt;

&lt;h3&gt;
  
  
  Question1
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;first_name_index&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;UPPER&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'GORG'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Question 2
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;name_index&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'OoPs'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;FETCH&lt;/span&gt; &lt;span class="k"&gt;FIRST&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;ROW&lt;/span&gt; &lt;span class="k"&gt;ONLY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Question 3
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;name_index&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'OoPs'&lt;/span&gt;
&lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Hahah'&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'OoPs'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Question 4
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;notes_index&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="n"&gt;text_pattern_ops&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employee&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'late%'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Tips
&lt;/h3&gt;

&lt;p&gt;1- Indexes can only be used from left to right side. If the first index column is not in the where clause, the index is of little help.&lt;br&gt;
2- Use an index-only scan for queries that access many rows but only a few columns.&lt;br&gt;
Avoid select * to increase chances for an index-only scan.&lt;/p&gt;




&lt;p&gt;please, refer to the comment section to see the answer and rate yourself and don't forget to give yourself a Confetti. &lt;/p&gt;

</description>
      <category>postgres</category>
      <category>tutorial</category>
      <category>database</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Nulls are equal in distinct but inequal in unique.</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Tue, 29 Aug 2023 11:27:57 +0000</pubDate>
      <link>https://dev.to/nightbird07/nulls-are-equal-in-distinct-but-inequal-in-unique-52me</link>
      <guid>https://dev.to/nightbird07/nulls-are-equal-in-distinct-but-inequal-in-unique-52me</guid>
      <description>&lt;p&gt;While developing ETL pipelines for a new data warehouse, I encountered unexpected query results related to NULL values. This prompted me to delve into the underlying SQL behavior to better understand the discrepancy. In this article, I aim to elucidate the contrasting treatment of NULLs by the DISTINCT and UNIQUE keywords. I'll present examples based on my analysis of the data warehouse.&lt;/p&gt;

&lt;h2&gt;
  
  
  DISTINCT: Treating Null as Equivalence
&lt;/h2&gt;

&lt;p&gt;When I sought to explore the categories or ranges of values within a specific column—let's say the "jobs" column—the initial result appeared as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;doctor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;engineer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...,&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This outcome raised a question: Does this mean that there is only a single NULL value? My previous understanding of PostgreSQL led me to believe that NULL values are treated as distinct. However, when I meticulously counted the occurrences of NULL values in the "jobs" column using the query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;nulljobs&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;jobs&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;jobs&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result unveiled a surprising 140 rows containing NULL values. It seemed that DISTINCT treated NULL values as equivalent. There could be a reasonable explanation for this behavior. The DISTINCT operation is typically employed for visualization or categorization purposes. Hence, treating NULLs as distinct might not make practical sense. However, this raises the question of why NULLs are treated as distinct values in the first place.&lt;/p&gt;

&lt;p&gt;This treatment is rooted in the concept of Three-Valued Logic (3VL), which consists of true, false, and unknown. Crucially, "unknown" is not equal to "unknown" in this context. Keep in mind that the comparison "unknown != unknown" doesn't hold. To shed light on this, consider that infinity + infinity equals infinity. This implies that unknown values can be aggregated into a single value or category.&lt;/p&gt;

&lt;h2&gt;
  
  
  UNIQUE Constraints: Ensuring Uniqueness Among Columns
&lt;/h2&gt;

&lt;p&gt;The behavior of NULL values under the UNIQUE constraint in PostgreSQL introduces interesting nuances. UNIQUE constraints are particularly tailored for use with partial indexes. In this specific context, the interpretation of NULL values differs significantly. Rather than serving as indicators of mean or central tendencies, NULL values under UNIQUE constraints embody the distinctiveness of other non-null values within a row. As a result, UNIQUE constraints do not revolve around the treatment of NULL values in isolation. Instead, they focus on preserving distinctions among values contained within individual rows.&lt;/p&gt;

&lt;p&gt;To illustrate this point further, let's consider a practical scenario involving a PostgreSQL database:&lt;/p&gt;

&lt;p&gt;Suppose we have a table named "employees" with columns "employee_id" and "email." We want to ensure that each email address in the "email" column is unique. However, NULL values should not interfere with this uniqueness requirement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;employee_id&lt;/span&gt; &lt;span class="nb"&gt;serial&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;UNIQUE&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;-- Create a partial index to enforce uniqueness among non-null ids&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;UNIQUE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;unique_email&lt;/span&gt;
    &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, PostgreSQL will enforce the UNIQUE constraint on the "email" column, allowing multiple NULL values. This aligns with the concept that the UNIQUE constraint is chiefly concerned with maintaining the distinctiveness of non-null values.&lt;/p&gt;

&lt;p&gt;For instance, the following insertions are valid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Valid insertions&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'john@example.com'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'mary@example.com'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, attempting to insert duplicate non-null values would result in a violation of the UNIQUE constraint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Invalid insertion due to violation of UNIQUE constraint&lt;/span&gt;
&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'john@example.com'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;when you SELECT some info using the partial index already made with EXPLAIN it is performing an index scan.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;EXPLAIN&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Summary and Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;DISTINCT allows duplicate NULLs in the result set, as it considers NULLs as distinct values that represent unknown or missing data. This behavior is based on the three-valued logic of SQL, where unknown is not equal to unknown.&lt;/li&gt;
&lt;li&gt;UNIQUE constraints treat NULLs as equal, as they enforce uniqueness among non-null values in a column or a set of columns. This behavior is useful for creating partial indexes that exclude NULL values from the index.&lt;/li&gt;
&lt;li&gt;The difference between DISTINCT and UNIQUE has an impact on the query performance and data integrity, as it affects how the data is filtered, sorted, and indexed. Developers should be aware of this difference and use appropriate techniques to handle NULL values in their queries.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>database</category>
      <category>tutorial</category>
      <category>sql</category>
      <category>programming</category>
    </item>
    <item>
      <title>PostgreSQL Optimization: A Quick Tip on Using Values Expression</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Sun, 13 Aug 2023 11:50:18 +0000</pubDate>
      <link>https://dev.to/nightbird07/postgresql-optimization-a-quick-tip-on-using-values-expression-2fce</link>
      <guid>https://dev.to/nightbird07/postgresql-optimization-a-quick-tip-on-using-values-expression-2fce</guid>
      <description>&lt;p&gt;I have been working with a database that contains thousands of clusters of women, each identified by a UUID. The challenge arises when implementing a clustering algorithm that involves determining if a new cluster exists within a larger cluster. Traditionally, achieving this might necessitate iterative loops in programming languages like Python, adding complexity to the codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Leveraging SQL Power
&lt;/h3&gt;

&lt;p&gt;Instead of resorting to external looping mechanisms, PostgreSQL provides a more streamlined approach using SQL itself. The &lt;code&gt;IN&lt;/code&gt; keyword, widely used to filter results, can be used to solve this clustering dilemma. For instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;cluster_id&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(...&lt;/span&gt; &lt;span class="n"&gt;over&lt;/span&gt; &lt;span class="mi"&gt;9000&lt;/span&gt; &lt;span class="n"&gt;IDs&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, let's explore an even more efficient way to accomplish this using the &lt;code&gt;values&lt;/code&gt; expression and the &lt;code&gt;ANY&lt;/code&gt; operator. This technique can yield performance improvements and optimize query execution plans.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Values Expression and ANY Operator
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;values&lt;/code&gt; expression constructs a temporary table from a list of expressions, while the &lt;code&gt;ANY&lt;/code&gt; operator evaluates if a value is equal to any element within an array or set. Integrating these constructs, the query can be reimagined as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;cluster_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;ANY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Surprisingly, this seemingly straightforward alteration can lead to a different and more efficient query execution plan. The database optimizer might choose to employ hash aggregation over values scanning and, potentially, hash joins when dealing with a substantial number of rows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Impact on Performance
&lt;/h3&gt;

&lt;p&gt;At first glance, this query rewrite might appear counterintuitive. However, its effect on performance can be profound, contingent on the underlying context. If the query planner orchestrates the values scan after completing all joins, it could lead to undesirable consequences. On the flip side, when the planner optimally schedules execution, query performance can experience a remarkable boost. In certain cases, this optimization technique has resulted in up to 100 times faster query execution – a substantial gain that can outweigh the perceived risk.&lt;/p&gt;

&lt;p&gt;It's crucial to note that the sequence of execution within the database is determined by the planner's internal tree structure. Generally, joins are prioritized over the &lt;code&gt;WHERE&lt;/code&gt; clause, prompting their execution before filtering with the &lt;code&gt;WHERE&lt;/code&gt; condition. If you're interested in modifying this behavior, PostgreSQL offers hints to guide query optimization. However, the detailed exploration of hints falls beyond the scope of this article.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In the realm of database optimization, the PostgreSQL database system never ceases to amaze with its wealth of features. This quick tip of utilizing the &lt;code&gt;values&lt;/code&gt; expression and &lt;code&gt;ANY&lt;/code&gt; operator for enhancing clustering queries showcases how intricate optimizations can lead to remarkable performance gains. While the impact of this technique might vary depending on the specific use case, its potential to dramatically accelerate query execution makes it an invaluable tool in the database optimization toolkit.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>C has some API</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Sun, 06 Aug 2023 15:07:47 +0000</pubDate>
      <link>https://dev.to/nightbird07/c-has-some-api-4jhl</link>
      <guid>https://dev.to/nightbird07/c-has-some-api-4jhl</guid>
      <description>&lt;p&gt;I took part in a contest that challenged me to write a very large and complex file. After finishing the first phase, I had to refine my code. I faced a problem with modularity design, which is how to split my code into smaller and simpler modules that use memory effectively. Before I go into more detail about this concept, let me explain some terms that you might need to know.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory management&lt;/strong&gt; is an important aspect of programming, as it affects how well a program can use the available memory resources. Memory management involves allocating, using, and freeing memory for different purposes, such as storing data, executing code, and communicating between processes.&lt;/p&gt;

&lt;p&gt;In this article, we will compare two memory management techniques: extern and shared memory. Extern is a keyword that allows a program to access a global variable or a function that is defined in another file. Shared memory is a mechanism that allows multiple processes to access the same memory region for inter-process communication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extern&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;The “extern” keyword is used in programming languages like C and C++ to declare variables or functions that are defined in other files. When a variable or function is declared as “extern,” it means that its definition can be found in another file within the project. The purpose of using “extern” is to provide a forward declaration so that the compiler knows that the variable or function exists and can be used, even though its definition is located elsewhere.&lt;/p&gt;

&lt;p&gt;Using the “extern” keyword allows for variable sharing across files in a project. For example, if you have a variable defined in one source file and you want to access it in another source file, you can declare it as “extern” in the second file. This tells the compiler that the variable is defined in a different file and should be linked appropriately during the compilation process. By using “extern,” you can share variables and functions across multiple files, enabling modular programming and code reuse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shared Memory&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Shared memory refers to a region of memory that can be accessed by multiple processes or threads simultaneously. In concurrent programming and inter-process communication (IPC), shared memory is used to exchange data between processes efficiently. Instead of using message passing or other forms of communication, processes can directly read from and write to the shared memory region.&lt;/p&gt;

&lt;h2&gt;
  
  
  both are the same
&lt;/h2&gt;

&lt;p&gt;though you may conclude that the extern is a safe API to use shared memory with restrict constraints on how to use the extern.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use "Extern":
&lt;/h2&gt;

&lt;p&gt;Use "extern" when sharing variables within a single program, especially when the data needs to be accessed by multiple source files.&lt;br&gt;
It simplifies data sharing and ensures consistency by using a single instance of the variable throughout the program.&lt;br&gt;
"Extern" is suitable for scenarios where multiple components of the program need access to common data without creating separate copies.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Shared Memory:
&lt;/h2&gt;

&lt;p&gt;Use shared memory when communication is required between independent processes running on the same machine.&lt;br&gt;
It enables data exchange and cooperation between separate programs by allowing them to access and share a common memory space.&lt;br&gt;
Shared memory is beneficial in scenarios where inter-process communication is needed for tasks like data exchange, coordination, or parallel processing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts and Recommendations:
&lt;/h2&gt;

&lt;p&gt;Both "extern" and shared memory serve important roles in different scenarios. Choose "extern" when focusing on data sharing within a single program to improve code modularity and efficiency.&lt;br&gt;
On the other hand, opt for shared memory when dealing with inter-process communication and cooperation between independent processes.&lt;br&gt;
Understanding the distinctions between these mechanisms will help developers make informed decisions about which approach to employ based on the specific requirements of their projects.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>api</category>
      <category>database</category>
      <category>apache</category>
    </item>
    <item>
      <title>Why Valgrind is a Better Tool for Detecting Memory Leaks than Leak in macOS</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Sat, 22 Jul 2023 13:22:36 +0000</pubDate>
      <link>https://dev.to/nightbird07/why-valgrind-is-a-better-tool-for-detecting-memory-leaks-than-leak-in-macos-308</link>
      <guid>https://dev.to/nightbird07/why-valgrind-is-a-better-tool-for-detecting-memory-leaks-than-leak-in-macos-308</guid>
      <description>&lt;p&gt;Memory leaks are a common source of bugs and crashes in C/C++ programs. Detecting memory leaks during development is critical, and two main options for memory leak detection on older macOS versions (macOS 10.x) are Valgrind and Leak Sanitizer.&lt;/p&gt;

&lt;p&gt;Valgrind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Valgrind is an open-source debugging and profiling tool for Linux, macOS, and Unix-like systems.&lt;/li&gt;
&lt;li&gt;It uses dynamic binary instrumentation to monitor programs at runtime.&lt;/li&gt;
&lt;li&gt;Valgrind can perform a range of memory debugging tasks, including detecting memory leaks, reads of uninitialized memory, double frees, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is a simple C++ program that leaks memory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// x is leaked here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When running this program through Valgrind, it generates the following leak report:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;==123== 4 bytes in 1 blocks are definitely lost in loss record 1 of 1
==123== at 0x100000F3F: operator new(unsigned long) (in /usr/lib/libc++abi.dylib)
==123== by 0x100000DEA: main (main.cpp:4)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Valgrind accurately pinpoints the source of the leak at line 4 and provides the allocation size.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;End of Example&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Valgrind provides extensive memory usage information, including detailed call stacks for leaked allocations.&lt;/li&gt;
&lt;li&gt;One of the key advantages of Valgrind is that it works on existing executables without recompiling the source code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Leak Sanitizer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leak Sanitizer is part of the Address Sanitizer feature in LLVM compiler infrastructure.&lt;/li&gt;
&lt;li&gt;It is enabled by building programs with the &lt;code&gt;-fsanitize=address&lt;/code&gt; option.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To enable Leak Sanitizer for the previous example, you would compile it with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;clang++ -fsanitize=address -g -o my_program my_program.cpp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When running the program, Leak Sanitizer would provide a report similar to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LeakSanitizer: detected memory leaks
Direct leak of 4 byte(s) in 1 object(s) allocated from:
#0 0x7fff8939066f in operator new(unsigned long) ../.././libc++abi.dylib (inline)
#1 0x100000dea8 in main main.cpp:4
#2 0x7fff50bbcdc9 in start (libdyld.dylib)

SUMMARY: LeakSanitizer: 4 byte(s) leaked in 1 allocation(s).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;End of Example&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leak Sanitizer tracks memory allocation and release during program execution.&lt;/li&gt;
&lt;li&gt;It provides basic memory leak reports at process exit, including memory ranges of leaks.&lt;/li&gt;
&lt;li&gt;Leak Sanitizer has lower runtime overhead compared to Valgrind, resulting in faster program execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why Valgrind is Better for Memory Leak Detection on macOS 10.x:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Valgrind provides more detailed memory information, including exact stack traces and allocation sizes.&lt;/li&gt;
&lt;li&gt;It supports memory profiling, allowing analysis of overall memory usage and identification of other issues.&lt;/li&gt;
&lt;li&gt;Valgrind actively tracks memory state during execution, catching issues more accurately.&lt;/li&gt;
&lt;li&gt;Valgrind integrates well with debugging tools like GDB for easy inspection of issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main downside of Valgrind is its performance overhead, as programs run slower under Valgrind. However, its rich analysis capabilities usually make this tradeoff worthwhile, especially during active development. For longer runs or production profiling, Leak Sanitizer can complement Valgrind to reduce performance impact. Overall, Valgrind remains the better choice for detailed memory debugging on older macOS versions.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>My Journey in Bitcoin Summer Code of Camp: Lessons Learned</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Wed, 12 Jul 2023 12:36:32 +0000</pubDate>
      <link>https://dev.to/nightbird07/my-journey-in-bitcoin-summer-code-of-camp-lessons-learned-1700</link>
      <guid>https://dev.to/nightbird07/my-journey-in-bitcoin-summer-code-of-camp-lessons-learned-1700</guid>
      <description>&lt;p&gt;As a participant in the Bitcoin Summer Code of Camp, I faced several challenges that I would like to share with others who may be going through similar experiences. Here are some bullet points that summarize what I learned:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Talk to elders in the same project: While it may seem obvious, you won't have a good idea about the project until you read the documentation and talk to people who have experience with it. Don't be afraid to reach out to seniors and ask questions.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask for evaluation: Some seniors can help you find the right spot that matches your current skills. Don't be afraid to ask for feedback on your progress and how you can improve.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't be discouraged if you don't know the technology: Learning a new technology is not the main problem. The challenge is how to apply the technology to the project. Focus on understanding the project requirements and how the technology can help you achieve the project goals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take your time: Some developers have been watching or working with the company for months, waiting for their chance to participate. You may feel like you're late to the game, but don't rush. Take your time to understand the project, learn the technology, and contribute in a meaningful way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Participate in hackathons for more challenging projects and new stacks: Hackathons help you get fast and act in a very efficient way to learn. They do have labels for the requirements, current skill level needed, etc., which helps you decide if you are ready for this.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Websites for hackathons: Here are some websites for hackathons that you can check out:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devpost.com/"&gt;Devpost&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hackerearth.com/"&gt;HackerEarth&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.angelhack.com/"&gt;AngelHack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Join open source projects: AGE is also an open source project. If you have any questions or facing any challenges, they provide a very interactive environment for contributors. Don't hesitate to message me if you need any help.&lt;br&gt;
Overall, my experience in the Bitcoin Summer Code of Camp was challenging but rewarding. By following these lessons learned, &lt;br&gt;
I was able to contribute to the project and improve my skills. Good luck to anyone else who is embarking on a similar journey!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>opensource</category>
      <category>contributorswanted</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why You should Start Contributing to OpenSource</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Sun, 09 Jul 2023 11:38:12 +0000</pubDate>
      <link>https://dev.to/nightbird07/why-you-should-start-contributing-to-opensource-52e1</link>
      <guid>https://dev.to/nightbird07/why-you-should-start-contributing-to-opensource-52e1</guid>
      <description>&lt;p&gt;My journey in the world of open source projects began last summer when I decided to dive into the Bitcoin project. However, I quickly realized that navigating through the vast amount of resources available was quite overwhelming. In this article, I will share some simple ways to overcome this challenge and provide insights on why you should start contributing to open source projects.&lt;/p&gt;

&lt;p&gt;Firstly, it's important to note that not all open source projects require contributions from regular contributors. Some projects are developed and maintained by a core team, while others actively seek contributions from the community. Before diving into a project, it's essential to understand the project's goals, development process, and whether they encourage community contributions.&lt;/p&gt;

&lt;p&gt;One interesting aspect of contributing to open source projects is the opportunity to refactor code written by others. While we often hear about the importance of refactoring our own code, exploring and improving someone else's code can be equally intriguing. It allows us to analyze different coding styles, thought processes, and approaches to problem-solving. Open source projects offer a chance to engage with code written by talented developers and learn from their expertise.&lt;/p&gt;

&lt;p&gt;When you dive into the world of open source, you'll encounter a diverse range of projects. To get started, it's helpful to narrow down your search by identifying specific open source projects that align with your interests and skills. One of the best platforms to discover open source projects is GitHub, which hosts a vast amount of public code repositories. You can browse through different projects, explore their issues and discussions, and find opportunities to contribute.&lt;/p&gt;

&lt;p&gt;If you're unsure where to begin, websites like &lt;a href="https://up-for-grabs.net/"&gt;Up For Grabs&lt;/a&gt; can be valuable resources. They curate lists of open source projects that actively seek contributions, making it easier for you to find projects that are suitable for your skills and interests. These platforms provide a starting point for your research and help you navigate the vast space of open source projects.&lt;/p&gt;

&lt;p&gt;now, what you are waiting for check the &lt;a href="https://github.com/apache/age/issues"&gt;AGE&lt;/a&gt; and pull some requests. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>database</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Exploring the Limitations of Postgres Partitioning: Lessons Learned and Best Practices</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Sat, 01 Jul 2023 10:51:52 +0000</pubDate>
      <link>https://dev.to/nightbird07/exploring-the-limitations-of-postgres-partitioning-lessons-learned-and-best-practices-5cj9</link>
      <guid>https://dev.to/nightbird07/exploring-the-limitations-of-postgres-partitioning-lessons-learned-and-best-practices-5cj9</guid>
      <description>&lt;p&gt;Postgres partitioning is a popular technique for horizontally slicing large tables into multiple partitions, offering improved query performance and data management. However, it's crucial to understand the limitations and potential pitfalls associated with this approach to avoid performance degradation, application retries, and failures. In this post, we'll delve into the experiences of implementing Postgres partitioning, the challenges faced, and recommended best practices to mitigate these issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding the Limitations:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Performance Degradation&lt;/strong&gt;: Partitioning can lead to a spike in lock manager waits and negatively impact user query performance. An increase in the number of smaller tables, along with multiple indexes and partitions, can generate a significant number of locks per query, causing contention problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges Faced:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Backend Struggles&lt;/strong&gt;: The implementation of partitioning can strain the backend system, particularly when each partition has numerous indexes. The creation of new backend processes for each connection and conflicts arising from lock acquisitions can overwhelm the database, leading to performance issues.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Identifying Key Issues:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lock Manager Weight&lt;/strong&gt;: The lock manager becomes burdened with managing the large number of logs created during the partitioning process, resulting in expensive operations and contention problems. This can severely impact query performance and overall system stability.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best Practices and Solutions:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;** Fast Path Locking ** : Be cautious when dealing with a large number of partitions as fast path locking, which relies on an in-memory data structure, has a limited number of locks (16) and can lead to contention issues. Consider using fewer, larger partitions to alleviate contention and ensure smooth operation, especially in long transactions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Dropping Indexes and Detaching Partitions&lt;/strong&gt;: Dropping indexes can cause locking contention, while detaching partitions can acquire access exclusive locks, blocking other operations. Upgrade to Postgres version 14 or later, which introduces the "detach concurrently" feature to address these issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Postgres Version Upgrade&lt;/strong&gt;: Upgrading to version 14 offers improved handling of locks by placing soft locks on specific partitions being queried. It provides a solution for complex locking scenarios, enhancing overall performance and management of partitioned tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;While Postgres partitioning offers benefits in terms of data management and query optimization, it is crucial to be aware of its limitations and potential challenges. By understanding the intricacies of lock management, fast path locking, and leveraging the advancements in newer Postgres versions, developers can implement partitioning effectively and ensure smooth system operation.&lt;/p&gt;

&lt;p&gt;you can watch a whole video &lt;a href="https://www.youtube.com/watch?v=YPorP8BsF_c"&gt;HERE&lt;/a&gt; it is highly recommended &lt;br&gt;
and even further you can read from this article &lt;a href="https://www.kylehailey.com/post/postgres-partition-pains-lockmanager-waits"&gt;HERE&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>apacheag</category>
      <category>programming</category>
      <category>database</category>
    </item>
    <item>
      <title>Start Using Yaml Files</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Thu, 22 Jun 2023 15:30:44 +0000</pubDate>
      <link>https://dev.to/nightbird07/start-using-yaml-files-26dh</link>
      <guid>https://dev.to/nightbird07/start-using-yaml-files-26dh</guid>
      <description>&lt;p&gt;Yaml stands for "YAML Ain't Markup Language". It is a human-readable data serialization language that is commonly used to describe configuration files. Some of the benefits of using Yaml are:&lt;/p&gt;

&lt;p&gt;Easy to read: Yaml files are easy to read and edit by humans. They use indentation instead of brackets, and colons and dashes instead of equal signs.&lt;/p&gt;

&lt;p&gt;Flexible: Yaml supports lists, objects, strings, booleans, integers, floats, null. It can represent complex data structures in a clean format.&lt;/p&gt;

&lt;p&gt;Language independent: Yaml files can be parsed and emitted by programs written in any language.&lt;/p&gt;

&lt;p&gt;Configuration files: Yaml is a popular format for configuration files. Many applications like Kubernetes, Ansible, and Github Actions use Yaml for their config files.&lt;/p&gt;

&lt;p&gt;Model libraries and UML diagrams: Because Yaml has a simple syntax and can represent complex data structures, it is useful for modeling libraries, architectures, and even UML diagrams. The indentation and formatting make the models very readable.&lt;/p&gt;

&lt;p&gt;and here is my journey of living with one of the huge libraries ever. Libpg.h though the header file of the libPg is enough to see the available procedures but still you need to give more hints and make it easier to recap the functionality or notes for a specific function.&lt;br&gt;
I started to write YAML files for each function and then connected these files in a UML representation you can actually do similar thing in your local machine with &lt;a href="https://github.com/lucasepe/yml2dot"&gt;yml2dot&lt;/a&gt; and then olaaa you got a visualization of your documentation. &lt;/p&gt;

</description>
      <category>apacheage</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A Deep Dive into EDB Postgres Advanced Server: Features and Benefits</title>
      <dc:creator>NightBird07</dc:creator>
      <pubDate>Tue, 13 Jun 2023 10:13:37 +0000</pubDate>
      <link>https://dev.to/nightbird07/a-deep-dive-into-edb-postgres-advanced-server-features-and-benefits-3ff</link>
      <guid>https://dev.to/nightbird07/a-deep-dive-into-edb-postgres-advanced-server-features-and-benefits-3ff</guid>
      <description>&lt;p&gt;EnterpriseDB's Postgres Advanced Server (EPAS) is a powerful, Oracle-compatible database management system built on the robust foundation of PostgreSQL. As organizations increasingly seek cost-effective and open-source alternatives to traditional proprietary databases, EPAS has emerged as a popular choice. In this article, we'll take a deep dive into the features and benefits that set EPAS apart from its competitors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Oracle Compatibility
&lt;/h2&gt;

&lt;p&gt;One of the most notable features of EPAS is its extensive Oracle compatibility. This allows organizations to migrate from Oracle databases to EPAS with minimal disruption to their existing applications and processes. Key Oracle compatibility features include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;PL/SQL support: EPAS includes a comprehensive implementation of PL/SQL, Oracle's procedural language for SQL. This enables developers to use their existing PL/SQL code with minimal changes when migrating to EPAS.&lt;/li&gt;
&lt;li&gt;Oracle-style packages: Packages are a key feature of Oracle's PL/SQL language, allowing developers to group related procedures and functions into a single, reusable module. EPAS supports the use of Oracle-style packages, simplifying the migration process.&lt;/li&gt;
&lt;li&gt;Oracle data types: EPAS supports a range of Oracle-specific data types, such as NUMBER, VARCHAR2, and DATE. This reduces the need for code changes when migrating from Oracle databases.&lt;/li&gt;
&lt;li&gt;EDB Migration Toolkit: This toolkit simplifies the process of migrating Oracle databases to EPAS. It automates the conversion of database schemas, stored procedures, and data, significantly reducing the time and effort required for migration.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Advanced Security
&lt;/h2&gt;

&lt;p&gt;Data security is a top priority for enterprises, and EPAS offers a suite of advanced security features to help protect sensitive information and ensure compliance with regulatory requirements. Key security features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data encryption: EPAS supports Transparent Data Encryption (TDE), which automatically encrypts data at rest, ensuring that sensitive information remains secure.&lt;/li&gt;
&lt;li&gt;Row-level security: This feature allows administrators to define security policies based on user roles and privileges, ensuring that users can only access the data they are authorized to see.&lt;/li&gt;
&lt;li&gt;Database auditing: EPAS includes comprehensive auditing capabilities, enabling organizations to track and monitor database activity for security, compliance, and performance analysis purposes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Performance Enhancements
&lt;/h2&gt;

&lt;p&gt;EPAS builds on PostgreSQL's performance capabilities with a range of enhancements designed to improve query execution times and overall system efficiency. These enhancements include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Index-only scans: EPAS supports index-only scans, a query optimization technique that allows the database engine to retrieve data directly from an index, avoiding the need to access the underlying table. This can significantly improve query performance in certain scenarios.&lt;/li&gt;
&lt;li&gt;Parallel query execution: EPAS can execute complex queries in parallel, leveraging multiple CPU cores to process large volumes of data more quickly.&lt;/li&gt;
&lt;li&gt;Advanced query optimization: EPAS includes an enhanced query optimizer, which uses sophisticated algorithms to determine the most efficient way to execute a given SQL query.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scalability and High Availability
&lt;/h2&gt;

&lt;p&gt;As organizations grow and their data requirements expand, the ability to scale databases efficiently becomes increasingly important. EPAS offers several features designed to support scalability and high availability, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EDB Postgres Replication Server: This tool enables organizations to set up replication between EPAS instances, providing both load balancing for read-heavy workloads and failover capabilities for high availability.&lt;/li&gt;
&lt;li&gt;Table partitioning: EPAS supports table partitioning, a technique that divides large tables into smaller, more manageable pieces. This can improve query performance and simplify data management tasks, such as backups and indexing.&lt;/li&gt;
&lt;li&gt;Connection pooling: EPAS includes built-in connection pooling, which allows multiple client connections to share a limited number of database connections. This can help improve system performance and resource utilization in high-concurrency environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  conclusion
&lt;/h2&gt;

&lt;p&gt;EDB Postgres Advanced Server offers a powerful and cost-effective alternative to traditional proprietary databases. With its Oracle compatibility, advanced security features, performance enhancements, and scalability capabilities, EPAS is an attractive option for organizations looking to modernize their database infrastructure and embrace the benefits of open-source technology.&lt;/p&gt;

</description>
      <category>database</category>
      <category>datascience</category>
      <category>postgres</category>
      <category>apacheage</category>
    </item>
  </channel>
</rss>
