<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jobin Jose on Medium]]></title>
        <description><![CDATA[Stories by Jobin Jose on Medium]]></description>
        <link>https://medium.com/@jej08157?source=rss-800dbce89a76------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7BdGLQFpGj9-_hXx</url>
            <title>Stories by Jobin Jose on Medium</title>
            <link>https://medium.com/@jej08157?source=rss-800dbce89a76------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:12:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jej08157/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[6 Tips to Optimize Your MySQL Queries for Faster Performance]]></title>
            <link>https://medium.com/@jej08157/6-tips-to-optimize-your-mysql-queries-for-faster-performance-fd70c358cfc?source=rss-800dbce89a76------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd70c358cfc</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[mysql-server]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Jobin Jose]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 10:03:21 GMT</pubDate>
            <atom:updated>2023-03-29T10:03:21.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YF8Upw1IeRh24Q2b" /><figcaption>Photo by <a href="https://unsplash.com/@rubaitulazad?utm_source=medium&amp;utm_medium=referral">Rubaitul Azad</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you’re working with MySQL, optimizing your queries can help make your database run faster and more efficiently. Here are some tips to help you optimize your MySQL queries:</p><h3>1. Use indexes:</h3><p><strong>Indexes help MySQL find data faster. By creating an index on columns that are frequently used in queries, you can speed up query execution time.</strong></p><blockquote>Let’s say you have a table called “employees” with columns for “employee_id”, “first_name”, “last_name”, “department”, and “hire_date”. You frequently run a query that selects all employees in a particular department:</blockquote><pre>SELECT * FROM employees WHERE department = &#39;Sales&#39;;</pre><p>Without an index, MySQL would have to scan the entire “employees” table to find all the rows where the “department” column is ‘Sales’. This can be slow if the table is large.</p><p>To optimize this query, you could create an index on the “department” column:</p><pre>CREATE INDEX department_idx ON employees (department);</pre><p>This tells MySQL to create an index on the “department” column, which makes it faster to look up rows based on the “department” value. Now when you run the same query, MySQL can use the index to quickly find all the rows where the “department” column is ‘Sales’:</p><pre>SELECT * FROM employees WHERE department = &#39;Sales&#39;;</pre><p>Using an index can significantly improve query performance, especially for large tables or tables with many columns. However,<em> </em><strong><em>it’s important to be mindful of the columns you choose to index — indexing too many columns can slow down write operations and use more disk space</em>.</strong> It’s best to only index columns that are frequently used in queries</p><h3>2. Avoid using SELECT * :</h3><p><strong>Only select the columns you need. Using SELECT * can slow down query performance and use more resources than necessary.</strong></p><p>For instance, if you only need to select the first name and last name of employees who work in the Sales department, you can write the query like this:</p><pre>SELECT first_name, last_name FROM employees WHERE department = &#39;Sales&#39;;</pre><p>By doing this, you are selecting only the necessary columns from the “employees” table, which can save MySQL resources and improve query performance. This is because MySQL doesn’t need to retrieve unnecessary columns that are not used in the query.</p><p>Using the * operator can be resource-intensive and slow down query performance, especially when the table has many columns or when you only need a few columns for your query. It&#39;s always a good practice to select only the columns that you need.</p><h3>3. Use joins wisely:</h3><p><strong>Joins can be useful for combining data from multiple tables, but they can also be expensive. Try to minimize the number of joins you use, and use efficient join types like INNER JOIN when possible.</strong></p><blockquote>for example you have two tables: “employees” and “departments”. The “employees” table has columns for “employee_id”, “first_name”, “last_name”, “department_id”, and “hire_date”, while the “departments” table has columns for “department_id” and “department_name”.</blockquote><p>If you want to select the names of employees who work in the Sales department, you can use a join between the “employees” and “departments” tables like this:</p><pre>SELECT employees.first_name, employees.last_name<br>FROM employees<br>JOIN departments ON employees.department_id = departments.department_id<br>WHERE departments.department_name = &#39;Sales&#39;;</pre><p>In this query, we’re joining the “employees” and “departments” tables based on their “department_id” columns, which relate to each other. Then, we’re selecting the first name and last name of employees who work in the Sales department, based on the “department_name” column in the “departments” table.</p><p>It’s important to use joins efficiently and only when necessary. Joins can be expensive and slow down query performance, especially if the tables have many rows. To optimize your queries with joins, it’s a good practice to only select the necessary columns and to use efficient join types like INNER JOIN when possible.</p><h3>4. Use sub queries carefully:</h3><p><strong>Sub queries can be a powerful tool, but they can also be slow. Try to avoid using sub queries in your queries whenever possible</strong>.</p><p>For instance you want to find the average hire date for employees in the Sales department. You could write a query that uses a sub-query like this:</p><pre>SELECT AVG(hire_date) <br>FROM employees <br>WHERE department_id = (SELECT department_id FROM departments WHERE department_name = &#39;Sales&#39;);</pre><p>In this query, we’re using a sub-query to find the “department_id” of the Sales department in the “departments” table, and then using that value in the outer query to select the average “hire_date” of employees in the Sales department.</p><p>While sub-queries can be useful in certain situations, they can also be slow and resource-intensive. In this case, we could rewrite the query to use a join instead of a sub-query:</p><pre>SELECT AVG(employees.hire_date)<br>FROM employees<br>JOIN departments ON employees.department_id = departments.department_id<br>WHERE departments.department_name = &#39;Sales&#39;;</pre><p>By using a join instead of a sub-query, we can often achieve the same result with better performance. It’s important to use sub-queries carefully and to consider alternative approaches when optimizing your queries.</p><h3>5.Use EXPLAIN to analyze queries:</h3><p><strong>EXPLAIN is a tool that can help you understand how MySQL executes a query. By using EXPLAIN, you can identify potential performance issues and optimize your queries accordingly.</strong></p><p>for example ,if you want to analyze the performance of the query that selects the names of employees who work in the Sales department and limit the results to the first 100 rows. You can use the EXPLAIN keyword to get information about how MySQL is executing the query, and to identify potential performance issues:</p><pre>EXPLAIN SELECT employees.first_name, employees.last_name<br>FROM employees<br>JOIN departments ON employees.department_id = departments.department_id<br>WHERE departments.department_name = &#39;Sales&#39;<br>LIMIT 100;</pre><p>In the output of the EXPLAIN statement, you will see information about the query execution plan, including the tables and indexes used, the join type, and the number of rows examined. By analyzing this information, you can identify potential bottlenecks and optimize your query accordingly.</p><p>For example, if the EXPLAIN output shows that MySQL is performing a full table scan instead of using an index, you may need to add an index to the relevant columns to improve query performance.</p><p>Using EXPLAIN can be a powerful tool for optimizing your queries and improving overall database performance. It&#39;s a good practice to use it regularly to analyze and optimize your queries.</p><h3>6. Optimize your server:</h3><p><strong>MySQL performance can also be affected by server settings. Make sure your server is configured to use the appropriate settings for your workload.</strong></p><p>One way to optimize your MySQL server is to adjust the server configuration settings to better suit the needs of your application and workload. For example, you can increase the amount of memory allocated to MySQL or adjust the cache sizes to improve query performance.</p><p>Here is an example of how you can optimize your MySQL server by adjusting the cache size for the key buffer:</p><pre>SET GLOBAL key_buffer_size = 1G;</pre><p>In this example, we’re setting the size of the key buffer to 1 gigabyte, which can improve the performance of queries that access the index.</p><p>Another way to optimize your MySQL server is to ensure that it is running on hardware that meets the performance requirements of your application. This may involve upgrading the CPU, RAM, or storage, or using a faster disk subsystem.</p><p>By optimizing your MySQL server, you can improve the performance and scalability of your application, reduce resource usage and ensure that it can handle increasing loads over time.</p><h3>By following these tips, you can optimize your MySQL queries and improve database performance.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd70c358cfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to contribute to an open-source project on GitHub]]></title>
            <link>https://medium.com/@jej08157/how-to-contribute-to-an-open-source-project-on-github-9eda23ed4854?source=rss-800dbce89a76------2</link>
            <guid isPermaLink="false">https://medium.com/p/9eda23ed4854</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Jobin Jose]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 06:20:40 GMT</pubDate>
            <atom:updated>2023-03-29T06:20:40.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZpPFqRpatssakT4M" /><figcaption>Photo by <a href="https://unsplash.com/@pakata?utm_source=medium&amp;utm_medium=referral">Pakata Goh</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Open-source software has become a vital part of the tech industry, and contributing to open-source projects can be a rewarding experience for developers. However, many developers may be hesitant to get started due to the perceived complexity of the process. In this tutorial, we’ll walk you through the steps to contribute to an open-source project on GitHub.</p><h3><strong>Step 1: Find an Open-Source Project to Contribute to</strong></h3><p>The first step in contributing to an open-source project on GitHub is to find a project that you’re interested in contributing to. You can search for open-source projects on GitHub by using the “Topics” search feature or by browsing popular repositories.</p><p>Once you’ve found a project that interests you, take some time to review the project’s README file, issues, and pull requests to get a better understanding of the project’s goals and current status.</p><h3><strong>Step 2: Fork the Repository</strong></h3><p>Once you’ve found a project you want to contribute to, the next step is to fork the repository. Forking a repository creates a copy of the repository under your GitHub account, allowing you to make changes to the code without affecting the original project.</p><p>To fork a repository, navigate to the project’s page on GitHub and click the “Fork” button in the top right corner.</p><h3><strong>Step 3: Clone the Repository</strong></h3><p>After forking the repository, the next step is to clone the repository to your local machine. To do this, click the “Code” button on your forked repository’s page and copy the repository’s URL.</p><p>Next, open your terminal and navigate to the directory where you want to clone the repository. Run the command git clone &lt;repository URL&gt; to clone the repository.</p><h3><strong>Step 4: Make Changes to the Code</strong></h3><p>Once you’ve cloned the repository, you can make changes to the code. Before making any changes, create a new branch to work on by running the command git checkout -b &lt;branch name&gt;.</p><p>Make your changes to the code, and when you’re finished, commit your changes by running the command git add . to stage your changes and git commit -m &quot;&lt;commit message&gt;&quot; to commit your changes.</p><h3><strong>Step 5: Create a Pull Request</strong></h3><p>After committing your changes, the next step is to create a pull request. A pull request is a way to submit your changes to the original repository for review and potential merging into the project.</p><p>To create a pull request, navigate to your forked repository’s page on GitHub and click the “New pull request” button. Select the branch you want to merge and the branch you want to merge into, and then click the “Create pull request” button.</p><h3><strong>Step 6: Collaborate with the Project Maintainers</strong></h3><p>After creating your pull request, the project maintainers will review your changes and may request additional changes or provide feedback. Be responsive to their comments and make any necessary changes to your code.</p><p>Once the maintainers approve your changes, they will merge your changes into the main repository, and your contribution will be a part of the project.</p><h3><strong>Conclusion</strong></h3><p>Contributing to open-source projects on GitHub can be an enriching experience for developers of all skill levels. By following the steps outlined in this tutorial, you can start contributing to open-source projects and making a meaningful impact in the open-source community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9eda23ed4854" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to generate an SSH key in your local machine and add it to GitHub or Bitbucket.]]></title>
            <link>https://medium.com/@jej08157/how-to-generate-an-ssh-key-in-your-local-machine-and-add-it-to-github-or-bitbucket-73f7c1922fee?source=rss-800dbce89a76------2</link>
            <guid isPermaLink="false">https://medium.com/p/73f7c1922fee</guid>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[ssh-keys]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Jobin Jose]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 15:13:26 GMT</pubDate>
            <atom:updated>2023-03-21T15:13:26.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Aip9coQujBeEWO3r" /><figcaption>Photo by <a href="https://unsplash.com/@synkevych?utm_source=medium&amp;utm_medium=referral">Roman Synkevych 🇺🇦</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What is an SSH key?</h3><p>SSH (Secure Shell) is a protocol used for securely logging into remote machines over an unsecured network. An SSH key is a secure way of authenticating yourself with the remote server, without having to enter your username and password every time you connect.</p><h3>Generating an SSH key</h3><ol><li>Open your terminal or command prompt.</li><li>Type ssh-keygen and press enter. This will generate a new SSH key pair.</li><li>You will be prompted to enter a file name to save the key. The default location and file name is ~/.ssh/id_rsa.</li><li>You will be prompted to enter a passphrase for the key. You can choose to enter a passphrase or leave it empty. If you enter a passphrase, you will be prompted to enter it every time you use the key.</li><li>Once the key is generated, you should see a message with the fingerprint of the key.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*wdZvjtiUrWc6hk3YXkrzpg.png" /><figcaption>ssh-keygen in terminal</figcaption></figure><h3>Adding the key to GitHub</h3><ol><li>Copy the contents of the public key file (~/.ssh/id_rsa.pub). You can do this by typing cat ~/.ssh/id_rsa.pub and copying the output.</li><li>Log in to your GitHub account and go to your account settings.</li><li>Click on “SSH and GPG keys” in the left-hand menu.</li><li>Click on the “New SSH key” button.</li><li>Give your key a name and paste the contents of the public key file into the “Key” field.</li><li>Click on “Add SSH key” to save the key.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVnloqAiELX_ypPsonRaYw.png" /></figure><h3>Adding the Key to BitBucket</h3><p>To add an SSH key to Bitbucket, you can follow these steps:</p><blockquote>Generate a new SSH key pair on your local machine using the command “ssh-keygen” in the terminal. Follow the prompts to generate the key pair.</blockquote><ol><li>Once you have generated your SSH key pair, open the public key file (~/.ssh/id_rsa.pub) in a text editor.</li><li>Log in to your Bitbucket account and navigate to your Personal Bitbucket settings.</li><li>Click on “SSH keys” in the left-hand menu.</li><li>Click on the “Add key” button.</li><li>Give your key a label and paste the contents of the public key file into the “Key” field.</li><li>Click on “Add key” to save the key.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPxvEzd05mhPHxTyWqYUGg.png" /><figcaption>bitbucket</figcaption></figure><p>Your SSH key should now be added to Bitbucket and you should be able to use it to authenticate with Bitbucket repositories.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73f7c1922fee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>