Author Archives: Deepak Mahto

About Deepak Mahto

Having 8+ Years of relevant/exciting/fruitful/challenging/learning in Oracle Technology. Currently working as Oracle Performance Consultant in an MNC. Hold Expertise in Performance Engineering, SQL Tuning, Database Tuning, SQL, PLSQL Development/Design Considerations and Oracle Internals. I enjoy reading on Oracle internals, posting some of my finding or observations and playing football.

SQL SERVER# : Get last possible time for a DAY.

During one of SQL requirement, was trying to form Range of Years for executing a DML in small batches as per YEAR. But due to missing last possible end time, we were not able to manipulate some records. For instance … Continue reading

Rate this:

Posted in Helper SQL, SQL Server Learning | Tagged , , , | Leave a comment

FIXED length character storage and NULL in SQL Server.

Most of us must be aware of CHAR datatype and its fixed length storage pattern. If we declare CHAR(32) and store only 4 bytes character ‘ABCD’, It will pads up remaining bytes (28 bytes). Ultimately, whole bytes is consume for … Continue reading

Rate this:

Posted in SQL Server Learning | Tagged , , , , | Leave a comment

APPROX_COUNT_DISTINCT in Oracle 12c.

Most of time during performance analysis to understand Stale stats, we usually need to check estimated NDV (Number of Distinct values). If data-set is huge , it take considerable time to project desired output using traditional COUNT(DISTINCT) appraoch. For any … Continue reading

Rate this:

Posted in Oracle 12c New Features, Oracle Internal, Oracle Performance | Tagged , , , | Leave a comment

Lateral Views in Oracle 12c.

#TGIF. In Oracle 12c, we got introduce to LATERAL Views officially(Before same was getting use internally as part of Query Transformation) to join Inline views, Pre 12c we were not able to achieve same of joining inline views. With Lateral … Continue reading

Rate this:

Posted in Oracle 12c New Features, Oracle Internal | Tagged , , | Leave a comment

SQL Server : Value Constructor Insight.

We all must be aware of VALUE Clause for Inserting values specified, in current blob we will explore different ways other then Insert were we can have use VALUE as handy.! 1. Generating Dummy Data! we can use Value to … Continue reading

Rate this:

Posted in Helper SQL, SQL Server Learning | Tagged , | Leave a comment

SQL Server : ExecuteNonQuery shows incorrect rows affected.

For one of client as per functionality we were invoking a SQL Server procedure using ExecuteNonQuery method. Within procedure we had a DML statement performing update and on rows affected as return from ExecuteNonQuery performing further functional stuff. In one … Continue reading

Rate this:

Posted in SQL Server Learning | Tagged , , , | Leave a comment

SQL Server : Get Numeric part from a varchar/string.

Found question to fetch only numeric information from a string/varchar in some of blogs, so thought let try and share my attempt. Implement logic: 1. Using Recursive With clause, segregated each and every character as separate row. 2. Using Regex … Continue reading

Rate this:

Posted in Helper SQL, SQL Server Learning | Tagged , , | Leave a comment

Date Generator in SQL Server using Recursive With Clause.

During one of performance analysis, identified lofty insert statements populating static tables with Date information. As part of one of functionality, we were generating dates and applying necessary function on it within date range specified. As part of performance improvement, … Continue reading

Rate this:

Posted in Helper SQL, SQL Server Learning | Tagged , , , | Leave a comment

#SQLSERVERLearning : Order By Learning.

Most of folks feel , both(Oracle-SQLServer) are traditional RDBMS database and should or need to work some what “SIMILAR”. But, But when we actually start working on core with queries, development and tuning.We identified a lot of difference between any … Continue reading

Rate this:

Posted in SQL Server Learning | Tagged , , , , , | Leave a comment

#SQLSERVERLearning : String Padding in Sql Server (LPAD/RPAD)

All my blogs with #SQLSERVERLearning is intended to cover all stuff identified as difference between Oracle and SQL Server. Hopefully it might be helpful for Oracle guy also working in SQL Server world. All finding or Observations with SQL Server … Continue reading

Rate this:

Posted in Helper SQL, SQL Server Learning | Tagged , , , , , , | Leave a comment