Showing posts with the label Tuning

Featured Post

Python Regex: The 5 Exclusive Examples

 Regular expressions (regex) are powerful tools for pattern matching and text manipulation in Python. Here are five Python regex examples with explanations: 01 Matching a Simple Pattern import re text = "Hello, World!" pattern = r"Hello" result =, text) if result:     print("Pattern found:", Output: Output: Pattern found: Hello This example searches for the pattern "Hello" in the text and prints it when found. 02 Matching Multiple Patterns import re text = "The quick brown fox jumps over the lazy dog." patterns = [r"fox", r"dog"] for pattern in patterns:     if, text):         print(f"Pattern '{pattern}' found.") Output: Pattern 'fox' found. Pattern 'dog' found. It searches for both "fox" and "dog" patterns in the text and prints when they are found. 03 Matching Any Digit   import re text = "The price of the

Five top SQL Query Performance Tuning Tips

SQL query runs faster when you write it in a specific method. You can say it as tuning. There are five tuning tips: List of Performance Tuning Tips use index columns, use group by, avoid duplicate column in SELECT & Where, use Left Joins use a co-related subquery. Five top SQL Query Performance Tuning Tips SQL Performance Tuning Tip: 01 Use  indexes in the where clause of SQL . Let me elaborate more on that. Be sure the columns that you are using in the WHERE clause should be already part of the Index columns of that database Table. An example SQL Query: SELECT *  FROM emp_sal_nonppi WHERE dob <= 2017-08-01; SQL Performance Tuning Tip: 02 Use GROUP BY . Some people use a  DISTINCT clause to eliminate duplicates . You can achieve this by GROUP BY. An example SQL Query: SELECT E.empno, E.lastname FROM emp E,emp_projact EP WHERE E.empno = EP.empno GROUP BY E.empno, E.lastname; SQL Performance Tuning Tip: 03 Avoid using duplicates in the Query. Some people use the same col